Page 2 of 2

Re: Trying to Use Arguments in Script

Posted: Fri Jan 31, 2014 4:45 pm
by omar
@tmcdonald, than you for all your help... Almost seems that you spoon fed me the info at the end...

I've gotten it where I can enter

Code: Select all

perl WeatherGooseII.pl 192.168.1.100 20 10 Temp C
[\code]

and the output is of the following
WARNING: TempC is at or above 20
Current Value: 24.66

Unfortunately I get the following in Nagios
[attachment=0]Nagios screenshot2.png[/attachment]

I have been spending the last hour trying to modify the script, changing information on .cfg files , etc; that I lost track of time. I wanted to thank you for getting me this far. Thank you.

Re: Trying to Use Arguments in Script

Posted: Fri Jan 31, 2014 5:49 pm
by omar
fixed issue... Turns out on the command_line on my .cfg file, I only listed the perl file and not the full directory. Afterwards I received a "Return code of 13 is out of bounds." Fixed that with a simple:

Code: Select all

chown nagios:nagios plugin-name
chmod 751 plugin-name
once again, thanks for you help tmcdonald.

Re: Trying to Use Arguments in Script

Posted: Mon Feb 03, 2014 10:35 am
by tmcdonald
Good to see things are making sense now. Looks like you got all the errors fixed? If you want I can keep this thread open for a bit in case you run into issues, or if you're satisfied we can close it now.

Re: Trying to Use Arguments in Script

Posted: Fri Feb 07, 2014 9:52 am
by omar
This thread can be closed... Turns out this small project was to get my feet wet into using Nagios... Now my real task is to use the NRPE plugin... I'm very excited to continue using and learning more about Nagios. thanks again to all who has helped

Re: Trying to Use Arguments in Script

Posted: Fri Feb 07, 2014 12:57 pm
by tmcdonald
If you need any help with NRPE don't hesitate to ask us here. Closing up, good luck.