is_active parameter

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
t.danna
Posts: 5
Joined: Tue Nov 08, 2011 4:36 am

is_active parameter

Post by t.danna »

Hello,
I've installed Nagios Core Version 3.2.0 on a Linux machine, and I use Centreon to monitoring my host/services. Unfortunatly, after some configuration changes, I can't see all configurated services on Centreon. I saw on ndo tables that the services that are not shown got "is_active" flag to 0 on nagios_objects table, meaning that they are not been correctly configured/loaded on my current monitoring. (Hosts that are on my configuration files are monitored fine, only some of my services are not). I know that I need to recheck my configuration files and try to reload the nagios server, but before to do that, I want to know two things:
1. Is there a way to see when the is_active flag went from 1 to 0 for each service? I'd like to be able to say "from date X at hour Y the service Z has not been monitored".
2. It seems that nagios is keeping monitoring the services even if the is_active flag is set to 0, but Centreon is not allowed to show them because of the flag. Is that true? If not, why i keep receiving notifications on services that are not marked as 'active' (I can see those notifications on ndo tables)?

Thanks in advance for your answers
t.danna
Posts: 5
Joined: Tue Nov 08, 2011 4:36 am

Re: is_active parameter

Post by t.danna »

Hi again, any hint?
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: is_active parameter

Post by jsmurphy »

This sounds like more of an issue with Centreon than Nagios or perhaps even a problem with Nagiosql if that's what they use as their configuration utility... you may be better off asking on the Centreon forums http://forum.centreon.com/ as there are probably more people there who understand Centreons inner workings better, unfortunately I've never used it.
t.danna
Posts: 5
Joined: Tue Nov 08, 2011 4:36 am

Re: is_active parameter

Post by t.danna »

Well, is_active column is clearly a Nagios issue, not Centreon's. And why I keep receiving notifications on ndo tables for not active objects?
I've already posted my question on Centreon's forum too, just in case. Thanks however.
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: is_active parameter

Post by jsmurphy »

It seems in my pre-coffee stupor yesterday morning I misunderstood what you were getting at the first time I read your post and worded my response a little poorly, my apologies. To answer your questions directly:
1. To accomplish monitoring of the is_active state you would need to write your own plugin as there is no inbuilt way to monitor the internal states of the NDO database and I don't know of any existing ones... I'd be interested to know if you did find one out there though.
2. This is more so the part I was responding to in the last post, I don't understand the inner workings of centreon well enough to know how it makes decisions on what to display and what not to display.

Hopefully this is answer is a little more helpful.
t.danna
Posts: 5
Joined: Tue Nov 08, 2011 4:36 am

Re: is_active parameter

Post by t.danna »

Dear jsmurphy,
first of all, thanks again for your time! No apologies needed, maybe I owe you a coffee! ;) Your first answer sure was helpful. Unfortunatly, the only way I can currently monitor the is_active state is connecting directly to ndoDB and running a query on nagios_objects table. AFAIK, whenever Nagios server is loaded, it sets the is_active flag of all objects to 0 and then starts to change its value to 1 every time an object is loaded (so, monitored). As I said earlier, in my current configuration all the hosts I need are monitored fine, only some of the services are not. So, maybe you're right and it's a Centreon issue and I just need to reload my Nagios and Centreon's server, I'll give it a try.
Regarding my second question I will try to give more details; let's say that I connect directly to ndoDB and I see on nagios_objects table 3 services: serviceA, serviceB and serviceC. ServiceA and serviceB have is_active flag set to 1, serviceC has it set to 0 after some configuration changes that occurred a week ago. I expect serviceC to not be monitored at all by now, and last entry on ndoDB to be related to last week; instead, i got some entries about serviceC being monitored today in statehistory table! Is it a normal issue? Is nagios monitoring it "just in case" tomorrow I change my mind and I want to see what that service was doing?
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: is_active parameter

Post by jsmurphy »

Hmmmm so after looking at my own set up and what's stored in the database, I'm not even sure exactly what the is_active table denotes... mine has roughly 3000 entries where is_active = 0 and they share no correlation that I can ascertain. Perhaps objects that currently have nothing scheduled? I think we might be looking at a red herring and the answers to this problem are elsewhere.

If you check the actual nagios scheduling logs... did it ever schedule or execute the check of the device? If it did then it may be there are some remnants left in the config somewhere... but if not then it's possible that the database retains the information for historical data purposes and that no real work is actually being done. I am however at this point just using my amazing powers of wild speculation :lol:.
t.danna
Posts: 5
Joined: Tue Nov 08, 2011 4:36 am

Re: is_active parameter

Post by t.danna »

:lol:
Yes, reading the NDOUtils Database Model I found out that the objects that you monitored even just once will be in your objects table forever, but with is_active parameter set to 0. You know, just like ex-gfs :mrgreen:
I think too that there can be some config remnants, I'll check it out. Thanks a lot!
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: is_active parameter

Post by jsmurphy »

Oh I dunno I find SELECT * FROM pub WHERE is_alcohol = true; is a good start towards clearing that table out :lol:. You're welcome :D
Locked