PLease help
Forough, Hamid
hamid.forough at amd.com
Tue Oct 11 18:26:38 CEST 2005
Thanks for that. I have almost completed it except for following:
I have a custom shell that checks the existence of a file on linux and
sends the correct result. This is the piece of the code that I have
question:
. . .
if test -e "/usr/lib/nagios/plugins/out.txt"
then
echo "Jobs XXFAILED"
rm -f /usr/lib/nagios/plugins/out.txt
exit 2
else
echo "Jobs XXSUCCEEDED"
rm -f /usr/lib/nagios/plugins/out.txt
exit 0
fi
The problem is when I run this file directly from linux, I get the echo
correctly and the files gets deleted. But when ran from Nagios, the echo
gets returned BUT IT DOES NOT DELETE THE FILE. Do u know why?
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Marc
Powell
Sent: Tuesday, October 11, 2005 10:51 AM
To: nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] PLease help
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Forough, Hamid
> Sent: Tuesday, October 11, 2005 10:46 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] PLease help
>
> I need to know how to write a custom plugin that checks results of a
> stored procedure in MSSQL 2k and returns Yes or NO? I am using 2b4
> verision of Nagios
Presuming you already know how to perform your query from a script this
should be all you need --
http://nagiosplug.sourceforge.net/developer-guidelines.html
--
Marc
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads,
discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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