Class not defined :'NagiosPlugin'

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

Class not defined :'NagiosPlugin'

Post by ranjitw »

Hi,

We need to monitor the IO for windows servers and have found the following plugin https://exchange.nagios.org/directory/P ... at/details

Have attached the NSC.ini file to the post.

I have followed the steps mentioned in the link for which I am getting following error.
You do not have the required permissions to view the files attached to this post.
Regards,
Ranjit W
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Class not defined :'NagiosPlugin'

Post by jdalrymple »

Any reason to not use simple performance counters?

Code: Select all

define service{
        use                                     diskperfcounter
        display_name                            Physical Disk Average Queue Length
        service_description                     phys_disk_avg_queue
        check_command                           check_nrpe_nscp!-c checkcounter -a "Counter=\\PhysicalDisk(_Total)\\Avg. Disk Queue Length" MaxWarn=10 MaxCrit=20
        }

define service{
        use                                     diskperfcounter
        display_name                            Logical Disk Average Write Queue
        service_description                     logical_disk_write_queue
        check_command                           check_nrpe_nscp!-c checkcounter -a "Counter=\\LogicalDisk(_Total)\\Avg. Disk Write Queue Length" Warn=10 MaxCrit=20
        }

define service{
        use                                     diskperfcounter
        display_name                            Logical Disk Average Read Queue
        service_description                     logical_disk_read_queue
        check_command                           check_nrpe_nscp!-c checkcounter -a "Counter=\\LogicalDisk(_Total)\\Avg. Disk Read Queue Length" Warn=10 MaxCrit=20
        }
Also if you're using nsc.ini I recommend updating to a more current version.
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

Re: Class not defined :'NagiosPlugin'

Post by ranjitw »

Hi,

I am not having check_nrpe_nscp on my machine . Please suggest how to go forward. Is it not possible to resolve Class not defined :'NagiosPlugin' issue ?
Regards,
Ranjit W
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Class not defined :'NagiosPlugin'

Post by tgriep »

You can use the default check_nrpe command to run thise service checks. Try defining them as follows.

Code: Select all

define service{
        use                                     diskperfcounter
        display_name                            Physical Disk Average Queue Length
        service_description                     phys_disk_avg_queue
        check_command                           check_nrpe!-c checkcounter -a "Counter=\\PhysicalDisk(_Total)\\Avg. Disk Queue Length" MaxWarn=10 MaxCrit=20
        }

define service{
        use                                     diskperfcounter
        display_name                            Logical Disk Average Write Queue
        service_description                     logical_disk_write_queue
        check_command                           check_nrpe!-c checkcounter -a "Counter=\\LogicalDisk(_Total)\\Avg. Disk Write Queue Length" Warn=10 MaxCrit=20
        }

define service{
        use                                     diskperfcounter
        display_name                            Logical Disk Average Read Queue
        service_description                     logical_disk_read_queue
        check_command                           check_nrpe!-c checkcounter -a "Counter=\\LogicalDisk(_Total)\\Avg. Disk Read Queue Length" Warn=10 MaxCrit=20
        }
To fix the NagiosPlugin error, you will have to update the NSClient++ agent on your Windows host to a newer version. From what I found, the older version didn't come with the VBS script needed to run this plugin.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

Re: Class not defined :'NagiosPlugin'

Post by ranjitw »

Thank you , Is there a way to mention in the command saying " Generate an alarm after taking an average of 60 mins ?"
Regards,
Ranjit W
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Class not defined :'NagiosPlugin'

Post by WillemDH »

I don't think this is possible with Nagios. You could do it clientside. This plugin http://outsideit.net/check-ms-win-disk-load/ allows you to pass the amount of samples over which an average is calculated, but you can only alert on read or write queue length.
Nagios XI 5.8.1
https://outsideit.net
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Class not defined :'NagiosPlugin'

Post by ssax »

Thanks Willem!

ranjit, the plugin that Willem posted is going to be your best bet, let us know if that works for you.

Thank you
Locked