how to wrap long lines in config?

Marc Powell marc at ena.com
Mon Aug 8 16:41:54 CEST 2005


Taking this to nagios-devel would probably be a good start. I would say
however that since there hasn't been much call for this feature in the
past and that we're close to a release candidate for 2.0 it's unlikely
that it'll be implemented right away unless you have some working code
to contribute.

--
Marc

> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Ralph.Grothe at itdz-berlin.de
> Sent: Monday, August 08, 2005 9:07 AM
> To: prosolutions at gmx.net; nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] how to wrap long lines in config?
> 
> You are to aggree to.
> 
> I too was turned off by command_line attribute lines that
> incorporate many arguments thus
> becoming far too long and defeating readabilty.
> 
> I got the reply that the nagios config file parser wasn't yet
> ready to handle backslash escaped newline chars.
> (if Nagios can be run on many OSs that have a deviating  notion
> about line breaks (e.g. MS \015\012 vs. Unix \012
> this could be the reason, I guess)
> 
> We should put line break issue on the developers' TODO list.
> Who should be given notice?
> 
> > -----Original Message-----
> > From: nagios-users-admin at lists.sourceforge.net
> > [mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of
> > prosolutions at gmx.net
> > Sent: Saturday, August 06, 2005 5:28 AM
> > To: nagios-users at lists.sourceforge.net
> > Subject: [Nagios-users] how to wrap long lines in config?
> >
> >
> > some of the config lines look real ugly.  like:
> >
> >        command_line    /usr/bin/printf "%b" "Nagios
> > System\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
> > $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress:
> > $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
> > $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" |
> > /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert -
> > $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
> >
> >
> > is it possible to wrap these ala bash to make them look sane?
> e.g.:
> >
> > command_line    /usr/bin/printf "%b" \
> > "Nagios System\n\n\
> > Notification Type: $NOTIFICATIONTYPE$\n\n\
> > Service: $SERVICEDESC$\n\
> > Host: $HOSTALIAS$\n\
> > Address: $HOSTADDRESS$\n\
> > State: $SERVICESTATE$\n\n\
> > Date/Time: $LONGDATETIME$\n\n\
> > Additional Info:\n\n\
> > $SERVICEOUTPUT$" \
> > | /usr/bin/mail -s \
> > "** $NOTIFICATIONTYPE$ alert - \
> > $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" \
> > $CONTACTEMAIL$
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is Sponsored by the Better Software Conference &
> EXPO
> > September 19-22, 2005 * San Francisco, CA * Development
> > Lifecycle Practices
> > Agile & Plan-Driven Development * Managing Projects & Teams *
> > Testing & QA
> > Security * Process Improvement & Measurement *
> > http://www.sqe.com/bsce5sf
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > ::: Please include Nagios version, plugin version (-v) and OS
> > when reporting any issue.
> > ::: Messages without supporting info will risk being sent to
> /dev/null
> >
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing
& QA
> Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list