Service-host check and notify but don't make log

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
NAGOWNER92
Posts: 16
Joined: Tue Jun 03, 2014 2:35 am

Service-host check and notify but don't make log

Post by NAGOWNER92 »

Good morning,

I have three nagios that control my company,a nagios server that check my lan and accepts passive check of the other two nagios that are in the bunker. I can't understand why in my log file,(/usr/local/nagios/var/nagios.log) of the primary Nagios server i periodically receive only checks of the two nagios-Bunker and rarely the active check of the primary Nagios.
Can someone help me?

Thanks in advance
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Service-host check and notify but don't make log

Post by slansing »

That is a bit vague, you mentioned that you send passive results up from the two nagios servers to the primary one, so it sounds like what you are experiencing above is normal. I'm not sure what you mean by rarely receiving active checks, can you go into more detail?
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Service-host check and notify but don't make log

Post by eloyd »

My question would be: Are you primarily monitoring hosts, or are you also monitoring services? If you're only monitoring hosts, Nagios won't check very often by default.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
NAGOWNER92
Posts: 16
Joined: Tue Jun 03, 2014 2:35 am

Re: Service-host check and notify but don't make log

Post by NAGOWNER92 »

The primary server is scheduled to execute services and host check of a part of lan, and accept passive service-host-check that belong to the other Nagios (two). But In my Nagios primary log i see only the checks that are originated by the two nagios, and very rarely the service-hosts checks that are performed by the Primary Nagios
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Service-host check and notify but don't make log

Post by scottwilkerson »

NAGOWNER92 wrote:The primary server is scheduled to execute services and host check of a part of lan, and accept passive service-host-check that belong to the other Nagios (two). But In my Nagios primary log i see only the checks that are originated by the two nagios, and very rarely the service-hosts checks that are performed by the Primary Nagios
The log will only show changes in state for active checks (e.g. UP to DOWN). Are you saying the active checks that the primary is reporting as DOWN are not being recorded in the logs?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Service-host check and notify but don't make log

Post by eloyd »

NAGOWNER92 wrote:The primary server is scheduled to execute services and host check of a part of lan, and accept passive service-host-check that belong to the other Nagios (two). But In my Nagios primary log i see only the checks that are originated by the two nagios, and very rarely the service-hosts checks that are performed by the Primary Nagios
Nagios will only log when checks differ in state. So if it is OK OK OK OK OK WARNING, then you will only see OK WARNING and not the OK OK OK OK in the middle.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
NAGOWNER92
Posts: 16
Joined: Tue Jun 03, 2014 2:35 am

Re: Service-host check and notify but don't make log

Post by NAGOWNER92 »

I agree with you about "nagios notify me only when checks differ in state" but i see in my log file the same checks that are repeated following the check interval that i have set and are showed even in the same state

THIS IS AN EXAMPLE OF MY LOG FILE

I have scheduled this service check every 4 minute and the result is always "TCP OK"

Jun 4 12:51:31 nagios1 root: [1401879090] PASSIVE SERVICE CHECK: pec-engine1-test;SMTP;0;TCP OK - 0.001 second response time on port 25

Jun 4 12:55:30 nagios1 root: [1401879329] PASSIVE SERVICE CHECK: pec-engine1-test;SMTP;0;TCP OK - 0.000 second response time on port 25
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Service-host check and notify but don't make log

Post by eloyd »

Passive checks are not checked by the Nagios host itself. They are sent to the Nagios host by something else. If you have your service checks defined as passive, then they will never be checked unless something else is checking them.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Service-host check and notify but don't make log

Post by slansing »

Eloyd is correct, passive results are exactly what they sound like, they are passively sent to the Nagios server from remote hosts when a threshold is met, for example, a link goes down on your router, the router pushes a trap notifying you of this. I'm not sure where you are coming from with:
I have scheduled this service check every 4 minute and the result is always "TCP OK"

Jun 4 12:51:31 nagios1 root: [1401879090] PASSIVE SERVICE CHECK: pec-engine1-test;SMTP;0;TCP OK - 0.001 second response time on port 25

Jun 4 12:55:30 nagios1 root: [1401879329] PASSIVE SERVICE CHECK: pec-engine1-test;SMTP;0;TCP OK - 0.000 second response time on port 25
Locked