Page 1 of 2
Monitor Ironport
Posted: Wed Nov 06, 2013 7:36 pm
by sheld0r
I'm trying to setup my first host with a custom plugin I downloaded for my Ironport. I've successfully imported the check_ironport plugin, but I'm a little confused on how to set things to monitor.
From CCM > Hosts > Host Management I see the $ARG1$ followed by others through $ARG8$. I have the Check command set for 'check_ironport' and Active. The command view says $USER1$/check_ironport -h $HOSTADDRESS$ $ARG1$ which I believe is checking for the actual host, which is green right now under lists of hosts.
So I assume next is to define what parameters I want, but that's where I'm confused. How do you know why syntax to use for the Ironport?
I navigated to /usr/local/nagios/libexec to test with the following command
Code: Select all
./check_ironport $HOSTADDRESS 192.168.100.121 $USER admin $PASSWORD passwordhere $CPU 90 95
But I get an error stating Can't collect data from an Ironpor appliance Ironport. Verify hostname, userID and password! But I know that's the username and password to login to the Ironport.
Can somebody point me in the right direction on setting up the specifics of an Ironport?
Re: Monitor Ironport
Posted: Thu Nov 07, 2013 10:09 am
by slansing
This looks like a service check plugin, I would try assigning it to a service.
./check_ironport $HOSTADDRESS 192.168.100.121 $USER admin $PASSWORD passwordhere $CPU 90 95
Using these macros here will not work, you would need to do this...
Code: Select all
/usr/local/nagios/libexec/check_ironport
As far as defining user credentials and thresholds you would need to run the above command, with just the plugin, to get the usage output. Then, once you have that output you can sculpt your command.
Re: Monitor Ironport
Posted: Thu Nov 07, 2013 2:26 pm
by sheld0r
But see I still don't understand the syntax to use, I keep getting back an error message stating
The WARNING number can not be larger or equal to the CRITICAL number!
See you understand how this all works very well, and your explanation below is very vague. This is my first plugin, so I'm still confused as to what syntax to use. I've looked at other plugins that have already been created, and tried to mimic those commands. But I either get the above WARNING response, or simply notes such as Notes:
Code: Select all
hostname - Can be a hostname or IP address
parameter - Can be status, cpu, ram, msgxhour, conn_in, conn_out, queue, workqueue,
msgs_in_quarantine, disk_util, queuedisk_usage or resourseconservation
vof_license, sophos_license, ipspam_license, cm_license
From a beginners standpoint, this is just confusing.
Re: Monitor Ironport
Posted: Thu Nov 07, 2013 2:32 pm
by slansing
What we are trying to do here is run the plugin directly as I showed above, when you call it directly from the CLI it should output the usage text that will tell you what syntax is necessary for you to define in your command. Can you run it, and copy and paste everything it outputs..?
Re: Monitor Ironport
Posted: Thu Nov 07, 2013 2:41 pm
by sheld0r
Alrighty, so here's what I got
Code: Select all
/usr/local/nagios/libexec/check_ironport
Please specify the hostname!
Usage: check_ironport <hostname> <user> <password> <parameter> <warning_nro> <critical_nro>
Notes:
hostname - Can be a hostname or IP address
parameter - Can be status, cpu, ram, msgxhour, conn_in, conn_out, queue, workqueue,
msgs_in_quarantine, disk_util, queuedisk_usage or resourseconservation
vof_license, sophos_license, ipspam_license, cm_license
parameters for STATUS are ignored but must be provided. The results for STATUS can be OK or critical.
parameters for RESOURSECONSERVATION should be 1 and 2.
parameters for *_license should reverse warning and critical values (since less days remaining is actually critical but script requires warning to be less than critical).
Re: Monitor Ironport
Posted: Thu Nov 07, 2013 6:00 pm
by tmcdonald
Okay, so knowing the usage:
Code: Select all
Usage: check_ironport <hostname> <user> <password> <parameter> <warning_nro> <critical_nro>
Go ahead and run the command from the command line substituting in the correct values and we'll see what happens.
Re: Monitor Ironport
Posted: Thu Nov 07, 2013 6:20 pm
by sheld0r
I'm not sure what syntax to use for parameter?
Code: Select all
/usr/local/nagios/libexec/check_ironport -h 192.168.100.121 -u admin -p passwordhere
-w 80 85 and then use -c 90 95 I believe.
Re: Monitor Ironport
Posted: Fri Nov 08, 2013 9:57 am
by BanditBBS
sheld0r wrote:I'm not sure what syntax to use for parameter?
Code: Select all
/usr/local/nagios/libexec/check_ironport -h 192.168.100.121 -u admin -p passwordhere
-w 80 85 and then use -c 90 95 I believe.
Sheld0r, it looks like according ot that help, no - u or anything like that...
Code: Select all
/usr/local/nagios/libexec/check_ironport 192.168.100.121 admin passwordhere cpu 90 95
Re: Monitor Ironport
Posted: Fri Nov 08, 2013 10:02 am
by slansing
I would agree with Bandit here, you will usually see flags such as "-H <hostname> -c <check> -a <arguments>" etc.. Would you mind uploading the plugin here as well so we can take a look at it?
Re: Monitor Ironport
Posted: Fri Nov 08, 2013 7:19 pm
by sheld0r
Code: Select all
/usr/local/nagios/libexec/check_ironport 192.168.100.121 admin passwordhere cpu 90 95
The above is correct, I was able to view the cpu data. If I try to view the queue for example, I get an error
The WARNING number can not be larger or equal to the CRITICAL number! which is because I haven't defined it. With CPU I define the thresholds, but what if I don't know the thresholds for the queue? It looks like simply entering a 1 will show the queue, or same thing for conn_in.
Options for this particular plugin.
Code: Select all
Notes:
hostname - Can be a hostname or IP address
parameter - Can be status, cpu, ram, msgxhour, conn_in, conn_out, queue, workqueue,
msgs_in_quarantine, disk_util, queuedisk_usage or resourseconservation
vof_license, sophos_license, ipspam_license, cm_license