Man page - naglint(3)

Packages contas this manual

Manual

naglint(3) User Contributed Perl Documentation naglint(3)

naglint - beautify nagios config files

  Usage: naglint [options] <file> [<files...>]
  Options:
  -h, --help                    Show this help message and exit
  -v, --verbose                 Print verbose output
  -V, --version                 Print version
  -c, --config                  config file. Default is ~/.naglintrc
  -i                            replace content inline instead of printing to stdout
  -r                            read directories recursivly
      --core                    core type can be nagios, icinga or shinken. Will be
                                autodetected unless specified.

This script beautifies nagios config files.

  - clean whitespace
  - clean indention
  - remove deprecated attributes
  - validate duplicate or invalid attributes
  - break long command lines into shorter pieces
  - sort attributes naturally

naglint has the following arguments:

    print help and exit
    
    print verbose output too
    
    use different config file. Default locations are ~/.naglintrc and /etc/thruk/naglint.conf
    
    print version and exit
    
    use specific config type. can be 'nagios', 'icinga' or 'shinken'.
    enables core type specific attributes. Will be autodetected unless
    specified.
    
    edit given files inline and overwrite them with their beautified objects
    
    read directories recursivly
    

returns 0 on success or number of errors otherwise

see FILES section for where to store config options.

    Number of spaces before object attribute names. Default 2
    
    Number of spaces before objects attribute values. Default 30
    
    Number of spaces before inline comments. Default 68
    
    Should list attributes be joined with space or not. Default ','
    
    Should long arguments be broken into multiple lines. Default 1
    
    list of attributes which should be on top of the object
    
    list of custom variables which will be put on top of other custom variables
    

Beautify single config file

  %> naglint objects.cfg > beauty.cfg

Beautify and replace single config file inline

  %> naglint -i objects.cfg

Process objects from STDIN

  %> cat objects.cfg | naglint > beauty.cfg

~/.naglintrc

  user config file

/etc/thruk/naglint.conf

  global config file

2012, Sven Nierlein, <sven@nierlein.de>

2026-02-06 perl v5.40.1