NRPE Check fails

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

NRPE Check fails

Post by kwhogster »

Nagios 4.1 core

I have this on 4 Domain Controls and this one keeps getting this error

Code: Select all

define service{
        use                     generic-service
        host_name               TGCS002
        service_description     AD
        check_command           check_nrpe!checkDC
        servicegroups           AD Check
        }
The nsclient

checkDC = cscript.exe //T:30 //NOLOGO scripts\\check_ad.vbs $ARG1

This appears several times a day.

TGCS002 This host has 1 comment associated with it AD Notifications for this service have been disabled UNKNOWN 03-06-2017 20:31:22 0d 0h 32m 22s 3/3 The command (checkdc) returned an invalid return code: 128

Can this ben changed to only check once a week?

Why is it causing this error
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE Check fails

Post by mcapra »

Assuming the exit code 128 is from cscript, I have no idea. I found this technet article that indicates some of the libraries needed may not be initializing, or that adequate resources are unavailable:
https://support.microsoft.com/en-us/hel ... initialize

It can also happen when cscript is running more than 1 script. Perhaps you have some cscript executions that are hung?
Former Nagios employee
https://www.mcapra.com/
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: NRPE Check fails

Post by kwhogster »

How can I run this check only once a week?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE Check fails

Post by mcapra »

1 week is 10080 minutes, so you should be able to set your Nagios object's check_interval to that.
Former Nagios employee
https://www.mcapra.com/
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: NRPE Check fails

Post by kwhogster »

I added that to 3 of my service definitions

Got these warnings

Warning: Service 'Guest Snapshots' on host 'TGKW009' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'NSClient++ Version' on host 'TGKW009' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'WSUS' on host 'TGKW009' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.

My services

Code: Select all

define service{
        use                     generic-service
        host_name               TGKW009
        service_description     NSClient++ Version
        servicegroups           nsclients
        check_interval          10080
        check_command           check_nt!CLIENTVERSION
        check_period            backup_time
        notification_period     backup_time
        }
define service{
        use                     generic-service
        host_name               TGKW009
        service_description     WSUS
        check_interval          10080
        check_command           check_ms_win_updates
        servicegroups           Windows Updates
        }
define service {
        host_name TGKW009
        service_description Guest Snapshots
        check_command box293_check_vmware_test!10.2.8.8!Guest_Snapshot!--guest!TGKW009!--warning!snapshot_age:30!--critical!snapshot_age:45
        initial_state u
        max_check_attempts 3
        check_interval 10080
        retry_interval 7
        active_checks_enabled 1
        check_period 24x7
        servicegroups   VMSnapShots
        register 1
}

My Template

Code: Select all

define host{
        name                    windows-desktop-vm
        use                     generic-host
        check_period            24x7
        check_interval          5
        retry_interval          1
        max_check_attempts      10
        check_command           check-host-alive
        notification_period     24x7
        notification_interval   30
        notification_options    d,r
        contact_groups          admins
        hostgroups              windows-desktops-vm
        register                0
        }
What should the notification level be set at then?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE Check fails

Post by mcapra »

You could bump it up to be the same as your check_interval, but those warnings can be safely ignore in this case. All they are telling you is that, since your check_interval is greater than your notification_interval, the effective notification_interval is equal to the check_interval. That might be a problem for some setups, but in this case the 1-week check_interval is deliberate.
Former Nagios employee
https://www.mcapra.com/
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: NRPE Check fails

Post by kwhogster »

I did this and it is working

Code: Select all

define service{
        use                     generic-service
        host_name               TGKW009
        service_description     NSClient++ Version
        servicegroups           nsclients
        check_interval          10080
        notification_interval   0
        check_command           check_nt!CLIENTVERSION
        check_period            backup_time
        notification_period     backup_time
        }
That works

Any thoughts
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE Check fails

Post by mcapra »

No additional thoughts, but if it's working that's good!
Former Nagios employee
https://www.mcapra.com/
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: NRPE Check fails

Post by kwhogster »

Lets lock this one now

seems to be working now.

Have another issue to post will do later
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NRPE Check fails

Post by cdienger »

Thanks for the update. We'll close this thread.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked