Passive problems - solved
Dan Rich
drich at employees.org
Fri May 2 22:34:51 CEST 2003
Never mind, I'm an idiot. I still had the SIG{'ALRM'} code in my script from
back when this used to be an active script. It was causing the script to
exit. Running a strace made the code look like it was exiting in the write to
the named pipe.
Did I mention I'm an idiot? :)
Dan Rich said:
> I am trying to monitor a system farm and want to use passive process checks to
> keep from running several hundred checks every few minutes. However, since I
> can run one command that will give me most of the data I want to check about
> the farm, I am trying to run that command and send passive notices to Nagios.
>
> The problem is, Nagios seems to accept some of my notifications and then the
> named pipe stops taking input. I've tried opening and closing the pipe once
> for each message, writing all the messages to a single open pipe, and now
> reopening the pipe every "n" messages, all with no success. Here is my
> current code:
>
> if (($cmdlines % 40) == 0) {
> close(CMDFILE);
> sleep 1;
> open(CMDFILE,"> $command_file") || die "cannot open command file: $!";
> }
> $cmdlines++;
> printf CMDFILE "[%d] PROCESS_SERVICE_CHECK_RESULT;%s;LSF;%d;%s\n",
> time, $hostname, $ERRORS{$state}, $output;
>
> It seems to work for around 140 writes if I reopen the pipe every 10, 190 if I
> reopen every 20, 230 if I reopen every 50, 240 if I reopen every 80, 290 if I
> reopen every 100, etc. and then dies. Too add to the oddness, I don't see
> anything in my nagios.log file for these passive results, although another
> nagios instance on the same server with an almost identical configuration
> shows passive results in its log file.
>
> Since I have nearly 750 machines to monitor this is not a good thing.
>
> Does anyone know of a workaround or solution for this?
>
> --
> Dan Rich <drich at employees.org> | http://www.employees.org/~drich/
> | "Step up to red alert!" "Are you sure, sir?
> | It means changing the bulb in the sign..."
> | - Red Dwarf (BBC)
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> 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
>
>
--
Dan Rich <drich at employees.org> | http://www.employees.org/~drich/
| "Step up to red alert!" "Are you sure, sir?
| It means changing the bulb in the sign..."
| - Red Dwarf (BBC)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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