NDODB config_type flag (S?bastien Barbereau)

Lars Michelsen lars.lists at googlemail.com
Fri Mar 13 20:38:22 CET 2009


Hello Seb.,

> I'm encountering a problem recently with the config_type flag from the
> nagios_services table. In some "circumstances" (when restarting nagios
> mainly) this flag is set to 0 rather than 1 for a couple of services.
> Usually flushing the DB completely and restating Nagios seems to do the
> work.
> Anyone has some idea why config_type would be set to 0 and how to fix on the
> long-term this problem?

We had some headache about this problem some time ago in NagVis project.

You can take a look at the code of our ndo mysql backend tocheck out
how we worked arround that bug:
https://nagvis.svn.sourceforge.net/svnroot/nagvis/nagvis/trunk/nagvis/includes/classes/GlobalBackendndomy.php

This code/comments in the constructor belongs to the problem:

/**
 * It looks like there is a problem with the config_type value at some
 * installations. The NDO docs and mailinglist say that the flag
 * config_type marks the objects as being read from retention data or read
 * from configuration. Until NagVis 1.3b3 only objects with config_type=1
 * were queried.
 * Cause of some problem reports that there are NO objects with
 * config_type=1 in the DB this check was added. If there is at least one
 * object with config_type=1 NagVis only recognizes objects with that
 * value set. If there is no object with config_type=1 all objects with
 * config_type=0 are recognized.
 *
 * http://www.nagios-portal.org/wbb/index.php?page=Thread&threadID=9269
 */
 if($this->checkConfigTypeObjects()) {
	 $this->objConfigType = 1;
 } else {
	 $this->objConfigType = 0;
 }

Follow the link to nagios-portal.org to get further information. The
thread is in german but google translate should do the job.

Regards,
Lars

2009/3/13  <nagios-devel-request at lists.sourceforge.net>:
> Send Nagios-devel mailing list submissions to
>        nagios-devel at lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://lists.sourceforge.net/lists/listinfo/nagios-devel
> or, via email, send a message with subject or body 'help' to
>        nagios-devel-request at lists.sourceforge.net
>
> You can reach the person managing the list at
>        nagios-devel-owner at lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Nagios-devel digest..."
>
>
> Today's Topics:
>
>   1. Re: timzones (Julian Hein)
>   2. Re: timzones (William Preston)
>   3. Re: timzones (Nick)
>   4. Hostgroup Overview (Ralph Henneberger)
>   5. Re: timzones (William Preston)
>   6. Re: timzones (Nick)
>   7. NDODB config_type flag (S?bastien Barbereau)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 11 Mar 2009 14:36:42 +0100
> From: Julian Hein <jhein at netways.de>
> Subject: Re: [Nagios-devel] timzones
> To: Nagios Developers List <nagios-devel at lists.sourceforge.net>
> Message-ID: <C5DD7CFA.737D%jhein at netways.de>
> Content-Type: text/plain;       charset="ISO-8859-1"
>
> Hi,
>
> You could have a look at
>
>  NoMa: https://www.nagiosforge.org/gf/project/noma/
>
> It is a Notification Manager, that handles Notifications outside of Nagios.
> Basically you send all notifications from Nagios to NoMa and than NoMa
> decideds if and who should be notified. I am not sure if it handles time
> zones currently, but it could easily be extended.
>
> Cheers,
> Julian
>
>
> Am 11.03.09 12:09 schrieb "Nick" unter <np121 at hotmail.com>:
>
>> Could do but we cover 20 different times zones with DST?s that need to be
>> adjusted for 2 times a yr.
>>
>>
>>
>> Just thought it might have been easier and less likely to forget updating
>> DST?s
>>
>>
>>
>> Some need to be work hours others need to be out of hours, weekend, holidays
>> it just gets large and messy
>>
>>
>>
>> Would need to have something near 100 different time configs
>>
>>
>>
>>
>>
>>
>>
>> Couldn't you just create 2 different "workhours" time config, relative to the
>> Nagios server, then put the appropriate one on each contact?
>>
>> 2009/3/11 Nick <np121 at hotmail.com>
>>
>> Hello
>>
>>
>> I have some hosts and services that the notifications need to be sent to 2
>> people ONLY during office hours
>>
>> The problem is that the 2 are in different world times zones
>>
>> Is I possible for a feature to be added to future versions for this
>>
>> Eg.  In the contact config to add a variable as to what time zone the
>> contact is in, relative to GMT
>>
>> Also to add a config file where can be added the start/end dates DST's for
>> the various times zones
>>
>> Unless you programmers have a better way of doing this
>>
>>
>>
>> Many thanks in advance
>>
>> Nick
>>
>>
>> ------------------------------------------------------------------------------
>> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
>> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
>> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
>> software that enables intelligent coding and step-through debugging.
>> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
>> _______________________________________________
>> Nagios-devel mailing list
>> Nagios-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
>> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
>> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
>> software that enables intelligent coding and step-through debugging.
>> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
>> _______________________________________________
>> Nagios-devel mailing list
>> Nagios-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 12 Mar 2009 09:35:50 +0100
> From: William Preston <nagios-devel at spidalinx.co.uk>
> Subject: Re: [Nagios-devel] timzones
> To: Nagios Developers List <nagios-devel at lists.sourceforge.net>
> Message-ID: <B51C8923-7AE1-4DB9-88C6-20EA12E94AF7 at spidalinx.co.uk>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
>
> On  Mar11, 2009, at 14:36, Julian Hein wrote:
>> You could have a look at
>>
>>   NoMa: https://www.nagiosforge.org/gf/project/noma/
>>
>> It is a Notification Manager, that handles Notifications outside of
>> Nagios.
>> Basically you send all notifications from Nagios to NoMa and than NoMa
>> decideds if and who should be notified. I am not sure if it handles
>> time
>> zones currently, but it could easily be extended.
>
> Yep, the new version of NoMa copes with timezones and DST.
> It's not yet available to download - but it's stable so I could
> upload it
> next week if I find the time to write the documentation :-)
>
>
> WIlliam
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 12 Mar 2009 11:09:30 +0100
> From: "Nick" <np121 at hotmail.com>
> Subject: Re: [Nagios-devel] timzones
> To: "'Nagios Developers List'" <nagios-devel at lists.sourceforge.net>
> Message-ID: <BAY105-DAV11B8B9841F9AA51D2AF8EBE39F0 at phx.gbl>
> Content-Type: text/plain;       charset="us-ascii"
>
> Thanks for that but we have to keep the notifications within Nagios
>
> We use FoxBox for sending out SMS's which is now built into Nagios
>
> Lets hope setting time zones per contact relative to GMT with a setting for
> start/end DST can be added to Nagios in a future version.
>
> Would be nice to have only a few timeperiods in one .cfg
>  And let nagios work out if the local time meets the requirement to send out
> a notification to that contact
>
> I counted up yesterday and I need over 100 different time periods to cover
> all the contacts, and that needs to be changed 2 times a year for DST. A
> task I'm not looking forward to and it makes room for errors.
> My nagios covers 20 world time zones
>
> Nick
>
>
>
> On  Mar11, 2009, at 14:36, Julian Hein wrote:
>> You could have a look at
>>
>>   NoMa: https://www.nagiosforge.org/gf/project/noma/
>>
>> It is a Notification Manager, that handles Notifications outside of
>> Nagios.
>> Basically you send all notifications from Nagios to NoMa and than NoMa
>> decideds if and who should be notified. I am not sure if it handles
>> time
>> zones currently, but it could easily be extended.
>
> Yep, the new version of NoMa copes with timezones and DST.
> It's not yet available to download - but it's stable so I could
> upload it
> next week if I find the time to write the documentation :-)
>
>
> WIlliam
>
> ----------------------------------------------------------------------------
> --
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 12 Mar 2009 12:19:51 +0100
> From: Ralph Henneberger <ralix at gmx.de>
> Subject: [Nagios-devel] Hostgroup Overview
> To: nagios-devel at lists.sourceforge.net
> Message-ID: <1236856791.4247.0.camel at localhost.localdomain>
> Content-Type: text/plain; charset="us-ascii"
>
> Hello
>
>
> I have some hostsgroups, the hostgroups overview is by now confusing.
> The problem is that the overview is for all or one hostgroup.
> Is I possible for a feature to be added to future versions for this
> example:
>
> ..nagios/cgi-bin/status.cgi?hostgroup=hostgroup_1,hostgroup_2,hostgroup_3&style=overview
>
> I patch my statuc.c, and the statuc.cgi do this in my version, my code
> is very disastrous
> and not flexible ;-)
>
> Many thanks and sorry for my ugly english
>
> Cheers Ralph
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 197 bytes
> Desc: Dies ist ein digital signierter Nachrichtenteil
>
> ------------------------------
>
> Message: 5
> Date: Thu, 12 Mar 2009 14:31:49 +0100
> From: William Preston <nagios-devel at spidalinx.co.uk>
> Subject: Re: [Nagios-devel] timzones
> To: Nagios Developers List <nagios-devel at lists.sourceforge.net>
> Message-ID: <52BAD6FD-68CC-4D25-AB17-73539F4D4E71 at spidalinx.co.uk>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
>
> On  Mar12, 2009, at 11:09, Nick wrote:
>> We use FoxBox for sending out SMS's which is now built into Nagios
>>
>
> If you mean the sendSMS.sh script from foxbox, then you can use it
> with NoMa too -
> the advantage is that you can log the failed sends and optionally
> escalate
> to Mail or Voice.
>
>> Lets hope setting time zones per contact relative to GMT with a
>> setting for
>> start/end DST can be added to Nagios in a future version.
>
> i agree it would be a handy feature, especially if checks could also
> be scheduled
> in localtime - I would use the standard system Timezone support though.
> Anyway, this is the developer list -> get coding and create a
> patch!!! ;-)
>
>> I counted up yesterday and I need over 100 different time periods
>> to cover
>> all the contacts, and that needs to be changed 2 times a year for DST.
>
> you make it sound so easy... in my experience it's a lot more complex
> - countries
> have a habit of changing aroung their DST changeovers on a whim.
> I'm thinking here particularly of Western Australia.
>
>
> William
>
>
>
> ------------------------------
>
> Message: 6
> Date: Thu, 12 Mar 2009 16:39:02 +0100
> From: "Nick" <np121 at hotmail.com>
> Subject: Re: [Nagios-devel] timzones
> To: "'Nagios Developers List'" <nagios-devel at lists.sourceforge.net>
> Message-ID: <BAY105-DAV1137A247E5A9BEEF72031AE39F0 at phx.gbl>
> Content-Type: text/plain;       charset="us-ascii"
>
> Its ok here I deal with most of Europe  including Russia (11 times zone for
> 1 country) the USA  and a few of others
>
> I'm not a programmer   so was hoping those that can will read this and act
>
> Nick
>
>
> -----Original Message-----
> From: William Preston [mailto:nagios-devel at spidalinx.co.uk]
> Sent: Thursday, March 12, 2009 14:32
> To: Nagios Developers List
> Subject: Re: [Nagios-devel] timzones
>
>
> On  Mar12, 2009, at 11:09, Nick wrote:
>> We use FoxBox for sending out SMS's which is now built into Nagios
>>
>
> If you mean the sendSMS.sh script from foxbox, then you can use it
> with NoMa too -
> the advantage is that you can log the failed sends and optionally
> escalate
> to Mail or Voice.
>
>> Lets hope setting time zones per contact relative to GMT with a
>> setting for
>> start/end DST can be added to Nagios in a future version.
>
> i agree it would be a handy feature, especially if checks could also
> be scheduled
> in localtime - I would use the standard system Timezone support though.
> Anyway, this is the developer list -> get coding and create a
> patch!!! ;-)
>
>> I counted up yesterday and I need over 100 different time periods
>> to cover
>> all the contacts, and that needs to be changed 2 times a year for DST.
>
> you make it sound so easy... in my experience it's a lot more complex
> - countries
> have a habit of changing aroung their DST changeovers on a whim.
> I'm thinking here particularly of Western Australia.
>
>
> William
>
> ----------------------------------------------------------------------------
> --
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>
>
>
>
> ------------------------------
>
> Message: 7
> Date: Fri, 13 Mar 2009 11:41:06 +0000
> From: S?bastien Barbereau <barbereau at gmail.com>
> Subject: [Nagios-devel] NDODB config_type flag
> To: Nagios Developers List <nagios-devel at lists.sourceforge.net>
> Message-ID:
>        <4e0e33ee0903130441m555bf514yeb2e1b90336b5cae at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,I'm encountering a problem recently with the config_type flag from the
> nagios_services table. In some "circumstances" (when restarting nagios
> mainly) this flag is set to 0 rather than 1 for a couple of services.
> Usually flushing the DB completely and restating Nagios seems to do the
> work.
> Anyone has some idea why config_type would be set to 0 and how to fix on the
> long-term this problem?
>
> Seb.
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
>
> ------------------------------
>
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>
>
> End of Nagios-devel Digest, Vol 34, Issue 5
> *******************************************
>

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com




More information about the Developers mailing list