Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Can someone please help explain the %b portion of the printf command in the default notification command definitions? Is it just to allow \n to produce new lines in the construction of an email? I want to build an additional notification command that is simplified for SMS messaging (so will all be on a single line) and wondering if I need to keep the %b, replace it with something else or just drop it?
%b ARGUMENT as a string with '\' escapes interpreted, except that octal escapes are of the form \0 or \0NNN
One could argue that this is so you can pass in arbitrary "blobs" (hence, "b") of data that don't get interpreted as further \-codes. So, basically, you're half right. This is so the macros that Nagios passes in, which may have weird stuff in them, get printed out properly instead of interpreted by the printf itself.