Page 2 of 3

Re: Host status information shows "OK: No data received yet"

Posted: Mon Mar 26, 2018 11:29 am
by rifelixd
kyang wrote:Hello,

Did you enable the option in the nagios.cfg? Currently it is set to 0 by default. Please edit and change it to 1 and then restart nagios.

Code: Select all

check_host_freshness=1

service nagios restart
Did you also have freshness checking enabled for the host in the XI CCM?
Hi @kyang,
Thanks for your response. I have got check host freshness set to 1 in nagios.cfg file of the Server.
I followed the document and set to check_dummy with Arg1 - 2 and Arg2 - "Host disconnected" .
Now all my hosts are disconnected although services inside this hosts are updating fine.
Please be advised that all these hosts are being pulled passively over port 5667 (NSCA).
Is there something I am not doing it right ?
Please advise.

Re: Host status information shows "OK: No data received yet"

Posted: Mon Mar 26, 2018 11:54 am
by scottwilkerson
you stated
I am using passive service using NCSA protocol and i would the host to return failed check if data not received over the port
Can you show us how you are sending the NSCA data for the host? I didn't see a post that outlined that.

You are sending a NSCA check for just the host as well as the services correct?

Re: Host status information shows "OK: No data received yet"

Posted: Mon Mar 26, 2018 12:20 pm
by rifelixd
Can you show us how you are sending the NSCA data for the host? I didn't see a post that outlined that.
You are sending a NSCA check for just the host as well as the services correct?
Hi @scottwilkerson,

I am posting my nsclient file for your reference.

Code: Select all

[/modules]
CheckWMI = 1
NSCAClient = 1
NSClientServer = 1
CheckExternalScripts = 1
CheckSystem = 1
CheckEventLog = 1
CheckDisk = 1
Scheduler = 1

[/settings/default]
allowed hosts = localhost,<my server IP>
password = nsclientadmin

[/settings/NSCA/client]
channel = NSCA
hostname = auto

[/settings/NSCA/client/targets/default]
address = <my server IP>
encryption = 3
password = <password>
payload length = 4096

[/settings/scheduler/schedules/default]
interval = 5m

[/settings/scheduler/schedules]
Drive C: Disk Usage = CheckDriveSize MinWarn=10% MinCrit=5% Drive=C: ShowAll
Drive D: Disk Usage = CheckDriveSize MinWarn=10% MinCrit=5% Drive=D: ShowAll
Operating System Version = checkWMI "Query=Select Version,Caption from win32_OperatingSystem"
Installed Software Version = vbscheck

[/settings/external scripts]
allow arguments = 1
allow nasty characters = 1
timeout = 90

[/settings/external scripts/scripts]
vbscheck = cscript.exe //T:30 //NoLogo scripts\\versioncheck.vbs

[/settings/log]
date setting = %Y.%m.%d %H:%M:%S
file name = nsclient.log
level = info

[/settings/log/file]
max size = 2048000
The services are all updating in my local time but the host appear to be down. I set check_dummy following the guide posted by @kyang in previous thread.

Re: Host status information shows "OK: No data received yet"

Posted: Mon Mar 26, 2018 2:56 pm
by scottwilkerson
Add the following to the configs under

Code: Select all

[/settings/scheduler/schedules]

Code: Select all

host_check = Check_OK "Everything is working fine"

See page 7 here
https://assets.nagios.com/downloads/nag ... Checks.pdf

Re: Host status information shows "OK: No data received yet"

Posted: Tue Mar 27, 2018 1:55 am
by rifelixd

Code: Select all

[/settings/scheduler/schedules]

Code: Select all

host_check = Check_OK "Everything is working fine"
@scottwilkerson,

I have added the command but returned with message- Command was not found: Check_OK in the Services status.
Is this because host are being pulled passively ?

Also, I am guessing even if this is added, its coming in as Service correct? I have no issues in setting the Services to prompt me "OK, Unknown, Warning, Critical" but what would i expect to see status changing for my host instead.

Please advise.

Re: Host status information shows "OK: No data received yet"

Posted: Tue Mar 27, 2018 3:11 am
by rifelixd
Gurus,

Also, is there a way where my host will appear down if any/all services go down ?
Some sort of dependency where my host is controlled by the associated services ?
This way my issue is resolved.

Re: Host status information shows "OK: No data received yet"

Posted: Tue Mar 27, 2018 8:12 am
by scottwilkerson
rifelixd wrote:I have added the command but returned with message- Command was not found: Check_OK in the Services status.
It should be there, lets try all lower case

Code: Select all

host_check = check_ok "Everything is working fine"
Here is the docs
https://docs.nsclient.org/reference/che ... /#check_ok
rifelixd wrote:Also, is there a way where my host will appear down if any/all services go down ?
Some sort of dependency where my host is controlled by the associated services ?
There isn't really any easy way to do this.

Re: Host status information shows "OK: No data received yet"

Posted: Tue Mar 27, 2018 10:52 am
by rifelixd
It should be there, lets try all lower case

Code: Select all

host_check = check_ok "Everything is working fine"
Hi @scottwilkerson, I tried all in lowercase but it returned with Command was not found: check_ok. checkok also return same.

Re: Host status information shows "OK: No data received yet"

Posted: Tue Mar 27, 2018 11:02 am
by scottwilkerson
Sorry, I just noticed you don't have the module enable in your config to allow check_ok, add this under

Code: Select all

[/modules]

Code: Select all

CheckHelpers = 1
then restart the service

That was on page 4 here
https://assets.nagios.com/downloads/nag ... Checks.pdf

Re: Host status information shows "OK: No data received yet"

Posted: Tue Mar 27, 2018 12:38 pm
by rifelixd
[user]scottwilkerson[/user] wrote:Sorry, I just noticed you don't have the module enable in your config to allow check_ok, add this under

Code: Select all

[/modules]

Code: Select all

CheckHelpers = 1
then restart the service

That was on page 4 here
https://assets.nagios.com/downloads/nag ... Checks.pdf
@scottwilkerson, Thank you so much!. That did solved my issue :D