Search found 15 matches

by omar
Fri Feb 07, 2014 9:52 am
Forum: Open Source Nagios Projects
Topic: Trying to Use Arguments in Script
Replies: 14
Views: 7749

Re: Trying to Use Arguments in Script

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
by omar
Fri Feb 07, 2014 9:50 am
Forum: Open Source Nagios Projects
Topic: New to Nagios. Installing Custom Plugin Problem
Replies: 15
Views: 8374

Re: New to Nagios. Installing Custom Plugin Problem

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
by omar
Fri Jan 31, 2014 5:49 pm
Forum: Open Source Nagios Projects
Topic: Trying to Use Arguments in Script
Replies: 14
Views: 7749

Re: Trying to Use Arguments in Script

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: chown nagios:nagios plugin-name chmod 751 plugin-name once again, thanks for you hel...
by omar
Fri Jan 31, 2014 4:45 pm
Forum: Open Source Nagios Projects
Topic: Trying to Use Arguments in Script
Replies: 14
Views: 7749

Re: Trying to Use Arguments in Script

@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 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 ...
by omar
Fri Jan 31, 2014 2:52 pm
Forum: Open Source Nagios Projects
Topic: Trying to Use Arguments in Script
Replies: 14
Views: 7749

Re: Trying to Use Arguments in Script

yeah I know that when it comes to arrays, the first element is 0, hence why I put $ARG3$ (TempC) as $ARGV[2]. Since $ARG1$ would be $ARGV[0] and $ARG2$ would be $ARGV[1]. Well since Nagios can definitely see and the script due to the define command in the .cfg files in Nagios libexec folder, I am as...
by omar
Fri Jan 31, 2014 2:33 pm
Forum: Open Source Nagios Projects
Topic: Trying to Use Arguments in Script
Replies: 14
Views: 7749

Re: Trying to Use Arguments in Script

I get you now (hopefully)... So $ARG1$, $ARG2$, etc can be called in script using $ARGV[x]. So using the coding above... I would use my $field = $ARGV[2]; //since I'm trying to get TempC, and Temp C was $ARG3$ in define service So would the script already know to put the values from define service (...
by omar
Fri Jan 31, 2014 2:11 pm
Forum: Open Source Nagios Projects
Topic: Trying to Use Arguments in Script
Replies: 14
Views: 7749

Re: Trying to Use Arguments in Script

I'm starting to think, passing arguments from define service to the script doesn't require any special macros or Nagio-specific coding, but just basic perl coding
by omar
Fri Jan 31, 2014 12:51 pm
Forum: Open Source Nagios Projects
Topic: Trying to Use Arguments in Script
Replies: 14
Views: 7749

Re: Trying to Use Arguments in Script

First I want to make sure that you meant "-c" "-w" and "-s" and that you typoed in your post. yes, Im sorry, I meant - w, -c, and -s... My mistake on that From the numerous code and articles I have read -c means critical levels. I believe, since I established $ARG1$ wi...
by omar
Fri Jan 31, 2014 12:28 pm
Forum: Open Source Nagios Projects
Topic: Trying to Use Arguments in Script
Replies: 14
Views: 7749

Trying to Use Arguments in Script

I’m still trying to get the hand of Nagios. Thankfully, this forum has been really helpful in research. Unfortunately my issue is probably so basic, that I cannot find many information on my particular issue. When it comes, to arguments, I understand that they must be declared in define command, and...
by omar
Wed Jan 29, 2014 3:09 pm
Forum: Open Source Nagios Projects
Topic: New to Nagios. Installing Custom Plugin Problem
Replies: 15
Views: 8374

Re: New to Nagios. Installing Custom Plugin Problem

Finally got it to show something on Nagios Web Interface!!! Nagios screenshot.png Turn outs there were two issues. One was that my WeatherGooseII.cfg file was not being read by Nagios. So I had to go into the nagios.cfg file and insert: cfg_file /usr/local/nagios/etc/objects/WeatherGooseII.cfg Secon...