nagios

Nagios - adding spaces/tabs/newline Between arguments of Service Check Command


For more readability I would like to add spaces around the arguments in a service's check command. Running a nagios check outputs an error as it seems to want everything on one likeso:

One line check_command definition

However I would like to spcify the check command likeso: separate lines check command


Solution

  • It’s not possible. Nagios parses configuration attributes by the logic “attribute value \n” so that’s how it has to look.

    Other options include breaking it up into multiple check commands, thereby reducing the amount of macros. It’s hard to say since you don’t share the actual text.

    On that note, do not share text in pictures. Ever. For any reason. Copy the text and format it as monospaced. If it contains sensitive information, redact it from the text, don’t draw on a picture. Sharing text as pictures is a great way to become very unpopular with colleagues, support personell, and anyone else you come in contact with who has to be able to access the actual text itself, or just want to be able to read it (they may use a screen reader).