Custom Perl not changing "Status" under Nagios 1.2


#1

Hi all:

So some platform background:

Nagios 1.2 on Fedora 3

I


#2

ok…i just figured it out. I wasn’t exiting correctly. Apparantly Nagios uses the exit number to determine status, not the PRINT line code given. I must have overseen that in the plugin-developer documentation.

Basically, below my PRINT line, I put:

exit $status;

and poof, it all worked!


#3

Glad you got it. I was going to suggest that you look at other perl scripts, to see how they handled the status, but since you had written your own script, that seemed to obvious. I am illiterate when it comes to writing my own stuff, so I have to just copy, beg, borrow and steal from other scripts.