Spaces in $SERVICEDESC$
Andreas Ericsson
ae at op5.se
Fri Sep 10 10:24:59 CEST 2004
Elmar van Mourik wrote:
> Hi all,
>
> For performance data I use the following command:
>
> command_line /usr/bin/printf "%b" "$LASTCHECK$\t$SERVICEDESC$\t$OUTPUT$\t$PERFDATA$\r\n" >> /usr/local/nagios/var/perfdata/$HOSTNAME$-$SERVICEDESC$-perfdata.out
>
> This is not a problem when the $SERVICEDESC$ is just a single word like "PING" or "HTTP". But when it's more than one word eg. "CPU Load" the file with the performance data is called "venus-CPU" and the first part of every line in the file is "Load-perfdata.out".
>
> I can change every Service Description in all the config files but that's no solution.
> Changing the $SERVICEDESC$ with a command like "sed y/" "/-/" in a new variable $SERVICE-DESC$ would be the best option for me.
>
> Where can I add this variable?
>
Write your own notification script. Then you can add whatever you want
to it and handle mishaps such as this.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Lead Developer
-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
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