NagiosXi - Commands & Plugins

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

NagiosXi - Commands & Plugins

Post by Bala.Mutyam »

Hi,

Is it possible to run NagiosXi built-in commands/plugins on remote hosts with NCPA agents? I'm trying but giving below error.

Service Definition:

Code: Select all

define service {
    host_name                host
    service_description      Process Count
    check_command            check_procs!550!1000
    max_check_attempts       2
    check_interval           5
    retry_interval           1
    check_period             24x7
    notification_interval    15
    notification_period      24x7
    notifications_enabled    1
    contact_groups           Linux-Alerts
    register                 1
}
Error Message:

Code: Select all

check_procs -w <range> -c <range> [-m metric] [-s state] [-p ppid] [-j jid]
[-u user] [-r rss] [-z vsz] [-P %cpu] [-a argument-array]
[-C command] [-X process_to_exclude] [-k] [-t timeout] [-v]
Command definition:

Code: Select all

define command {
    command_name    check_procs
    command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
}
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: NagiosXi - Commands & Plugins

Post by jbrunkow »

Yes, you should be able to run the same plugins from NCPA (on Linux) that you do from XI. However, the same plugins may not be present in NCPA that are in XI. If you find that you need to install them, you will need to compile them as well.

I should probably mention that you can also pull this data using the API in NCPA. Please have a look at the document linked below as I think this may be a better solution for you.
API processes

I think your output indicates that the plugin exists on the system, but the usage is probably not correct. What is in the three arguments in the command definition of XI? Did you input all of those values when you ran the plugin from the NCPA machine? What is the exact command you submitted?

You can usually use the -h option to see all of the options for a given plugin. Maybe there's a required argument that we're missing.

Code: Select all

check_procs -h
If you have more questions, please take a look at the knowledgebase article linked below.
Nagios XI - Using Scripts / Plugins With NCPA
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Bala.Mutyam
Posts: 97
Joined: Wed Apr 29, 2020 12:18 pm

Re: NagiosXi - Commands & Plugins

Post by Bala.Mutyam »

@jbrunkow: Hi, thanks for the update. I'm trying run the checks without installing plugins and it seems to be not possible without it.
User avatar
jbrunkow
Posts: 441
Joined: Fri Mar 13, 2020 10:45 am

Re: NagiosXi - Commands & Plugins

Post by jbrunkow »

Yes, the plugin will have to be present on the machine trying to run the check.

Have you tried using the API? I believe you can query for the same information from NCPA this way without needing to install the plugin on each one.
API processes
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked