Monitor Ironport

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sheld0r
Posts: 49
Joined: Thu Jan 03, 2013 5:39 pm

Monitor Ironport

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitor Ironport

Post 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.
sheld0r
Posts: 49
Joined: Thu Jan 03, 2013 5:39 pm

Re: Monitor Ironport

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitor Ironport

Post 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..?
sheld0r
Posts: 49
Joined: Thu Jan 03, 2013 5:39 pm

Re: Monitor Ironport

Post 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).
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitor Ironport

Post 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.
Former Nagios employee
sheld0r
Posts: 49
Joined: Thu Jan 03, 2013 5:39 pm

Re: Monitor Ironport

Post 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.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Monitor Ironport

Post 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
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitor Ironport

Post 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?
sheld0r
Posts: 49
Joined: Thu Jan 03, 2013 5:39 pm

Re: Monitor Ironport

Post 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
Locked