Git Product home page Git Product logo

rsyslog-doc's Introduction

rsyslog-docs

Documentation for the rsyslog project

Documentation for rsyslog is generated with the (Python) Sphinx documentation processor. Documentation for the rsyslog-doc project itself is provided by this README and other documentation linked from this file.

Learning the doc tools

If you are new to rst and Sphinx, see the Sphinx documentation to get started: http://www.sphinx-doc.org/en/stable/contents.html

Contributed Software/Content

In the repo you will find a contrib directory.

Although content in this directory is part of the official rsyslog-doc repo, the status is different. While other content in this repo is fully supported by the dev team, content in the contrib directory is supported primarily by the contributor who provided it.

Content may range from small one-off scripts to tools for automating builds of the docs. See the contrib README for details.

If you have new things to add to this area, please follow the directions on this page for contributing to the docs and submit your changes as a new Pull Request.

Dev Team resources

In addition to the directions here, there is also a separate BUILDS_README.md file for use by rsyslog-doc team members. This doc is used as a quick reference for those who regularly provide dev and official release builds of the documentation.

Contributing to the docs

  1. Login with a GitHub account
  2. Fork the official https://github.com/rsyslog/rsyslog-doc repo
  3. Create a new branch off of the latest master branch
  4. Make your changes
  5. Commit to the new branch in your fork
  6. Submit a Pull Request (PR) for review (https://github.com/rsyslog/rsyslog-doc/pulls)
  7. Stop making any changes to your new branch now that you have submitted a Pull Request for review. Instead, create a new branch from your master branch while you wait for feedback from the doc team.
  8. A member of the team will review and offer feedback on your work. After feedback has been given and you have made all necessary changes, your PR will be accepted and merged into the official master branch.
  9. At this point, delete your branch that you submitted the PR from and start a new one for the next round of work.

For small changes, the work can be done entirely through the GitHub web interface. For larger changes, some familiarity with Git is useful, though some editors such as Atom or Visual Studio Code make interfacing with Git easier for newcomers.

Before you begin your work, you are encouraged to review the existing PRs and open issues so that you can coordinate your work with other contributors.

Please reach out if you have any questions as you work through making your changes.

Tip: If you would like something less complex to get started with, please see issues tagged with good first issue or help wanted

Requesting feedback/help

While working on changes to the docs, you are encouraged to seek input from other members of the community. This can be done via the mailing list, here on GitHub by submitting a new issue or (experimentally) by posting a question to Stack Exchange.

Building the documentation

These directions assume default installs of Python for Windows and Linux. Because the Sphinx project recommends using Python 2.7, that is what is shown here.

Assumptions

  • You wish to install the pip Python package as a standard user, which places installed packages into that user's home directory. Remove the --user flag if you wish to install system-wide for all users instead.

  • You wish to use a virtual environment to install Sphinx and its dependencies into a dedicated environment instead of installing alongside packages that were installed system-wide or to the user's home directory with the --user flag. If you wish to install the sphinx package and all dependent packages for all users of the system, then you will need to run the package installation commands as an elevated user account (e.g., sudo, su or with administrator rights on a Windows system).

  • You are running through these steps for the first time. Leave out the steps involving installation of packages and applications if generating an updated copy of the documentation.

Prep environment

The first part of the process is a little different depending on your OS. The later steps are identical, so those steps have been covered in one place.

Linux

  1. Download the pip installer from https://bootstrap.pypa.io/get-pip.py

  2. Install pip locally instead of system-wide

    1. python ./get-pip.py --user
  3. Install virtualenv package and create new virtual environment

    1. python -m pip install virtualenv --user
    2. python -m virtualenv rsyslog-docs-build
    3. source rsyslog-docs-build/bin/activate
  4. Install git for your distro. Because distros name the package differently, you may need to substitute the name of the package from the examples below with the name of the package for your distro.

    You will need to install Git in order to clone the project repo, manage your changes and contribute them back for review and eventual inclusion in the project.

    Example commands for installing Git:

    • Debian/Ubuntu: apt-get install git-core
    • CentOS/RHEL: yum install git

    See the Installing Git chapter from Pro Git 2 for additional examples.

Windows

  1. Download the pip installer from https://bootstrap.pypa.io/get-pip.py
  2. Download and install Git for windows from https://git-scm.com/download/win
  3. Install pip locally instead of system-wide
    1. c:\python27\python get-pip.py --user
  4. Install virtualenv package and create new virtual environment
    1. c:\python27\python -m pip install virtualenv --user
    2. c:\python27\python -m virtualenv rsyslog-docs-build
    3. rsyslog-docs-build\Scripts\activate.bat

Windows and Linux

  1. Install sphinx package and any other project dependencies in our new virtual environment instead of system-wide
    1. pip install -r requirements.txt
  2. Clone the official Git repo
    1. git clone https://github.com/rsyslog/rsyslog-doc.git
  3. Checkout either the current stable or development (aka, "master") branch
    1. cd rsyslog-doc
    2. git checkout BRANCH_NAME_HERE
      • Choose the v8-stable branch for coverage of features currently available in the latest stable release
      • Choose the master branch for coverage of upcoming features and fixes
  4. Optional: If you have previously cloned the repo, run git pull to update it with new changes before continuing.

Generate documentation

  1. Generate HTML format
    1. sphinx-build -b html source build
  2. Generate EPUB format
    1. sphinx-build -b epub source build
  3. Review generated contents
    • Open rsyslog-doc/build/index.html in a browser
    • Use Calibre, Microsoft Edge, Okular, Google Play Books or any other EPUB compatible reader to view the rsyslog-doc/build/rsyslog.epub file

rsyslog-doc's People

Contributors

0mp avatar alorbach avatar amg1127 avatar codeharsh avatar cropi avatar deoren avatar dmolik avatar friedl avatar frikilax avatar janmejay avatar jgerhards avatar jsiwrk avatar julthomas avatar jvymazal avatar kenyon avatar mostolog avatar mrworkman avatar n2yen avatar pduveau avatar qha avatar radu-gheorghe avatar ralnoc avatar rgerhards avatar richm avatar swadeley avatar taavi-valjaots avatar taotetek avatar theinric avatar ugerhards avatar whissi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rsyslog-doc's Issues

New "usecases" branch/chapter/topic

I propose that we add a new "usecases" "branch" to the documentation. It should contain descriptions of actual use cases, and most importantly provide config snippets that can simply be copy&pasted. Of course, it makes sense to populate this branch with common use cases first, but more exotic ones should also be added. In any case, the core content should be relatively brief, probably with links to more elaborate material.

The goal is to support users who just want to get a specific task done but do not want to dig too deep into rsyslog specifics.

I'll add a sample in my own fork so that we can get a better idea of what I have on my mind.

Document Output File Syncing in rsyslog.conf.5

Output file syncing and the meaning of a dash in front of a log file name is not documented at all in the rsyslog.conf.5 man page; it is only documented in source/compatibility/v3compatibility.rst in the rsyslog-doc repository, where it is hard to find.

Could this please be added / moved to the rsyslog.conf.5 man page?

(I should probably have reported this against the syslog repository, sorry.)

Don't ship generated files in source/_static/*

When building the Debian package for rsyslog-doc, I get the following error message:
E: rsyslog-doc source: source-is-missing source/_static/jquery.js
E: rsyslog-doc source: source-is-missing source/_static/underscore.js
W: rsyslog-doc: embedded-javascript-library usr/share/doc/rsyslog-doc/html/_static/jquery.js
W: rsyslog-doc: embedded-javascript-library usr/share/doc/rsyslog-doc/html/_static/underscore.js

Looking at https://github.com/rsyslog/rsyslog-doc/tree/master/source/_static I don't see a good reason to ship those files in the source directory (aside from rsyslog.css, which atm is disabled in conf.py). Please consider removing those files. They are auto-generated by sphinx

modules: examples use outdated configuration directives

A lot of modules use outdated configuration directives, like $ModLoad.
The should use the new, preferred syntax.

This is just an example:

# grep \$ModLoad * -R
compatibility/v3compatibility.rst:  $ModLoad immark # provides --MARK-- message capability
compatibility/v3compatibility.rst:  $ModLoad imudp # provides UDP syslog reception
compatibility/v3compatibility.rst:  $ModLoad imtcp # provides TCP syslog reception
compatibility/v3compatibility.rst:  $ModLoad imgssapi # provides GSSAPI syslog reception
compatibility/v3compatibility.rst:  $ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
compatibility/v3compatibility.rst:  $ModLoad imklog # provides kernel logging support (previously done by rklogd)
compatibility/v3compatibility.rst:  $ModLoad immark
compatibility/v3compatibility.rst:  $ModLoad imudp
compatibility/v3compatibility.rst:  $ModLoad imudp
compatibility/v3compatibility.rst:  $ModLoad imklog
compatibility/v3compatibility.rst:statements to the top of your rsyslog.conf (but after the $ModLoad's!) -
concepts/messageparser.rst:can be loaded via $ModLoad just like any other loadable module. It is
configuration/ruleset/rsconf1_rulesetcreatemainqueue.rst:  $ModLoad imtcp
configuration/ruleset/rsconf1_rulesetparser.rst:-  load your custom parsers via $ModLoad
configuration/ruleset/rsconf1_rulesetparser.rst:$ModLoad imudp $ModLoad pmdevice1 # load parser "device1.parser" for
configuration/ruleset/rsconf1_rulesetparser.rst:device 1 $ModLoad pmdevice2 # load parser "device2.parser" for device 2
configuration/global/options/rsconf1_modload.rst:$ModLoad
configuration/global/options/rsconf1_modload.rst:``$ModLoad ommysql # load MySQL functionality $ModLoad /rsyslog/modules/ompgsql.so # load the postgres module via absolute path``
configuration/rsyslog-example.conf:# $ModLoad - Dynamically loads a plug-in and activates it
configuration/rsyslog-example.conf:$ModLoad ommysql  # load MySQL functionality
configuration/rsyslog-example.conf:$ModLoad /rsyslog/modules/somemodule.so # load a module via absolute path
configuration/modules/ommail.rst:  $ModLoad ommail
configuration/modules/ommail.rst:  $ModLoad ommail
configuration/modules/omrelp.rst:  $ModLoad omrelp
configuration/modules/mmnormalize.rst:$ModLoad mmnormalize $mmnormalizeRuleBase /path/to/rulebase.rb \*.\*
configuration/modules/omsnmp.rst:   $ModLoad omsnmp
configuration/modules/imptcp.rst:  $ModLoad imptcp # needs to be done just once 
configuration/modules/omlibdbi.rst:$ModLoad omlibdbi $ActionLibdbiDriver mysql $ActionLibdbiHost
configuration/modules/omhdfs.rst:  $ModLoad omhdfs $OMHDFSFileName /var/log/logfile \*.\* :omhdfs:
configuration/modules/imfile.rst:  $ModLoad imfile # needs to be done just once 
configuration/modules/imtcp.rst:  $ModLoad imtcp # needs to be done just once
configuration/modules/omfwd.rst:  $ModLoad omfwd
configuration/modules/gssapi.rst:-  $ModLoad omgssapi - load output gss module
configuration/modules/gssapi.rst:-  $ModLoad `imgssapi <imgssapi.html>`_ - load input gss module
configuration/modules/omuxsock.rst:  $ModLoad omucsock
configuration/modules/mmsnmptrapd.rst:$ModLoad mmsnmptrapd # needs to be done just once # ... other module
configuration/modules/ommysql.rst:$ModLoad ommysql $ActionOmmysqlServerPort 1234 # use non-standard port
configuration/modules/omoracle.rst:            $ModLoad omoracle
configuration/modules/imgssapi.rst:  $ModLoad imgssapi # needs to be done just once
configuration/modules/imrelp.rst:  $ModLoad imrelp # needs to be done just once
configuration/modules/imsolaris.rst:  $ModLoad imsolaris
configuration/modules/pmlastmsg.rst:$ModLoad pmlastmsg # this parser is NOT a built-in module # note that
configuration/modules/omudpspoof.rst:$ModLoad omudpspoof $ActionOMUDPSpoofTargetHost server.example.com
configuration/modules/omudpspoof.rst:$ModLoad omudpspoof $template spoofaddr,"192.0.2.1" $template
configuration/modules/omudpspoof.rst:$ModLoad omudpspoof $template spoofaddr,"192.0.2.1"
configuration/modules/im3195.rst:  $ModLoad im3195 $Input3195ListenPort 1601
configuration/modules/index.rst:been loaded (using $ModLoad).
configuration/modules/imklog.rst:  $ModLoad imklog
configuration/modules/imudp.rst:   $ModLoad imudp # needs to be done just once
configuration/modules/impstats.rst:  $ModLoad impstats
configuration/modules/omruleset.rst:$ModLoad omruleset # define ruleset for commonly written file $RuleSet
configuration/modules/omruleset.rst:$ModLoad omruleset # define "second" ruleset $RuleSet nested
configuration/modules/imuxsock.rst:  $ModLoad imuxsock # needs to be done just once
configuration/modules/imuxsock.rst:  $ModLoad imuxsock # needs to be done just once
configuration/modules/imuxsock.rst:  $ModLoad imuxsock # needs to be done just once
configuration/modules/imuxsock.rst:  $ModLoad imuxsock # needs to be done just once
configuration/modules/imuxsock.rst:  $ModLoad imuxsock # needs to be done just once
configuration/modules/mmjsonparse.rst:$ModLoad mmjsonparse \*.\* :mmjsonparse:
configuration/modules/imkmsg.rst:$ModLoad imkmsg
configuration/actions.rst:  $ModLoad ommysql
installation/install_from_source.rst: $ModLoad immark # provides --MARK-- message capability
installation/install_from_source.rst: $ModLoad imudp # provides UDP syslog reception
installation/install_from_source.rst: $ModLoad imtcp # provides TCP syslog reception
installation/install_from_source.rst: $ModLoad imuxsock # provides support for local system logging
installation/install_from_source.rst: $ModLoad imklog # provides kernel logging support
tutorials/tls_cert_udp_relay.rst:    $ModLoad imudp    # load UDP server plugin
tutorials/database.rst:    ``$ModLoad ommysql``
tutorials/database.rst:    ``$ModLoad ompgsql``
tutorials/tls.rst:        $ModLoad imtcp # load TCP listener
tutorials/high_database_rate.rst:$ModLoad ommysql # load the output driver (use ompgsql for PostgreSQL)
tutorials/high_database_rate.rst:$ModLoad imudp # network reception $UDPServerRun 514 # start a udp
tutorials/high_database_rate.rst:server at port 514 $ModLoad imuxsock # local message reception
tutorials/high_database_rate.rst:$ModLoad ommysql # load the output driver (use ompgsql for PostgreSQL)
tutorials/high_database_rate.rst:$ModLoad imudp # network reception $UDPServerRun 514 # start a udp
tutorials/high_database_rate.rst:server at port 514 $ModLoad imuxsock # local message reception
tutorials/tls_cert_server.rst:    $ModLoad imuxsock # local messages
tutorials/tls_cert_server.rst:    $ModLoad imtcp # TCP listener
tutorials/reliable_forwarding.rst:$ModLoad imuxsock # local message reception $WorkDirectory /rsyslog/work
tutorials/reliable_forwarding.rst:$ModLoad imuxsock # local message reception $WorkDirectory /rsyslog/work

integration into rsyslog.com project site

I would love to see the doc integrated into the rsyslog.com site, and have it look like a natural / "normal" page on the site. This obviously needs some fiddeling. I have experimentally uploaded the current content as is to here:

http://www.rsyslog.com/doc/newdoc/index.html

Obviously, the doc has lost much of its appeal. The question is if we can get this somehow integrated into the site or if we need to find some alternative. Again, I'd prefer integration.

Formal Statement of RainerScript

A formal definition of the RainerScript syntax will aid in generating valid rsyslog configurations. Any format is acceptable and ABNF is not required.

Wiki on github? rsyslog wiki?

As I'd like to discuss this on github (and archive here), I think I use an issue (even though it's not really one ;)).

I notice that we have enabled the wiki on github. Does it really make sense to do that? I see that we need to have some instructions to go with the documentation itself (kind of "meta-doc" for the doc project). I see four places where it could reside:

  • github wiki
  • rsyslog wiki
  • README-type of files
  • regular doc files

I tend to think that regular doc files would be best, so that the "how to document" part becomes part of the doc itself -- maybe in it's own subdirectory.

Create an assets directory

Hi,

It would be nice to create an asset directory/hierarchy to hold all images, javascript, stylesheets... this would make the main hierarchy much cleaner

Keep it on
Bests

SEO: 'passing json to rsyslog'

JSON is trendy.
There is more chance that people have heard about JSON than rsyslog.

After some digging I found some json-features in rsyslog.
This is cool, because it allows rsyslog to be used as a scalable service bus, which passes json to listeners based on certain criteria.

In the documentation I cannot really find it easily..so a quick google will probably point people to:

http://blog.gerhards.net/2012/03/json-and-rsyslog-templates.html

How about making a section with the title 'passing json to rsyslog' ?
I think it would be smart marketingwise and good to promote popular formats supported by rsyslog.

New TOC structure

We need a new TOC structue that is easy to follow and appealing to beginners. @radu-gheorghe already made a suggestion, which I have put into the repo:

https://github.com/rsyslog/rsyslog-doc/blob/master/proposed-toc

We should work on that proposal in order to get closer to a final version. Alternatively, we can implement it and make changes as we go along. Comments and feedback both on the process as well as the actual TOC are appreciated. If no comments occur, we probably go ahead and begin to implement the propsal.

"directives" vs. "parameters"

With commit 5de8140 a new template for module descriptions was implemented/suggested. I like this template, but I think that "module directives" and "input directives" are not proper terms. IMHO these are "parameters". "Directive" to me has a somewhat more active co-notation. Whereas in v7+, these are just "parameters" provided to the module() and input() objects.

In regard to the legacy stuff (later on the pages), I think "directive" is the correct term to use. So I would like to have a quick discussion which term is more understandable to users and make sure we settle on one set of terms and document this term usage so that it will be consistent throughout the doc (in general, adding a "howto write the doc" documentation would IMHO also be a valuable part of the new doc).

Manual Structure

The current structure looks like a good start, but it needs improvement. Doc pages within a chapter are not necessarily ordered like they should be. How is the structure of the manual generated, especially how to influence the order of subdirectories and files within the directory?

immark not yet documented

The immark module is not yet documented. When you start with the new syntax you have to read the source code to find the Interval parameter.

incomplete compatibility notes in wrong section

In section "Sponsors and Community" [0] there is

If you are upgrading from rsyslog v2 or stock sysklogd, be sure to read the rsyslog v3 compatibility
notes, and if you are upgrading from v3, read the rsyslog v4 compatibility notes and if you upgrade 
from v4, read the rsyslog v5 compatibility notes.

Not only is this list incomplete (see #44), I also think it doesn't belong into this section and rather under "Compatibility" [1]

[0] http://www.rsyslog.com/doc/master/#sponsors-and-community
[1] http://www.rsyslog.com/doc/master/#compatibility

remove v7-devel branch, update v7-stable

Right now, there no longer is a v7-devel version of rsyslog and it is unlikely that we will get one again (usually we have only one devel version, with that being that most current one --> master --> v8-devel).

So we need to merge v7-devel into v7-stable and

git rm -b v7-devel

Should v7-devel be required again for whatever reasons, we can re-create the branch. That's exactly what I do with rsyslog's program source tree.

link building

The links to internal pages and external resources look strange and are not clickable. Is this a html import problem? In any case, we should get proper hypertext again, where the link text is clickable and can be different from the anchor (following the "how to author great hypertext" guidelines).

add more info to RepeatedMsgReduction

http://www.rsyslog.com/doc/v8-devel/configuration/global/options/rsconf1_repeatedmsgreduction.html

I think this defaults to off, but the page doesn't make that clear.

This is really something that breaks a lot of log processing and so should be discouraged

first, it would help to have a sample showing several logs, then the same thing with this turned on. One thing is that I believe the behaviour changed over versions. In very old versions the message logged was just "last message repeated N times", but I believe around version 4 or so it changed to include the message after this so you could tell what message was repeated.

then there should be a blurb saying that while turning this on can save some space in logs, most log analysis tools need to see the repeated messages, they can't handle the "last message repeated" format. This is a feature that worked decades ago when logs were small and reviewed by a human, it fails badly on high volume logs processed by tools.

interlinking problems

A user report I received on the web site below. I think it is related to the doc generation process:

I'm not sure if I'm directing this to the right place, but I couldn't find anything for feedback about the web site and this seemed like the best option to send to.

I was looking at the documentation on http://www.rsyslog.com, and got an error trying to follow a link. I was at this page - http://www.rsyslog.com/doc/v7-stable/configuration/modules.html#id2 and I tried to follow the link for omfile under Output Modules (http://www.rsyslog.com/doc/v7-stable/configuration/omfile.html), but I get the error "Invalid file specified". I tried omfwd, omjournal, ompipe, and omusrmsg, and they all get the same error. I also tried imfile under Input Modules, but I get the same error.

I'm on Windows 7, using a Chrome browser. I've tried it under Internet Explorer as well, but get the same results.

I do like the new look, it just appears that you have a hiccup here to fix.

define standard for parameter descriptions

We need to define a standard way of describing a parameter. This is already inconsistent in the the original html doc and was on the "this needs to be fixed" list there as well.

IMHO, each parameter needs to have

  • parameter name
  • type (string, number, boolean, ...)
  • mandatory yes/no
  • available in which versions
  • longer description

All of this should of course come in a consistent formatting (which was not the case in the html doc).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.