Nagios 3 structure
Paul Weaver
paul.weaver at bbc.co.uk
Thu Sep 11 09:35:51 CEST 2008
I would suggest putting your nagios configuration into subversion. Initially you can see who makes changes, and roll back any you don't like. You could then move to adding hooks in to check the config before hand.
Perl scripts are all you need for batch updates (like adding n number of hosts to a new service group, which I started doing a couple of days ago)
Our (nagios 2) layout is a little like this:
./etc/nagios.cfg
inherits commands.cfg (all commands)
inherits time.cfg (all time periods)
inherits template.cfg (default template -- hourly notification, 24/7 checks, 4 minute checks, 30 second retrys)
inheirts directories
contacts
system-infrastructure (routers, dns, etc)
system-system1
system-system2
system-system3
Each of those has their own templates, which overrides things like contact details, and sub directories based on the system (so system-foo contains components "midtier", "database", "media", etc)
Each directory eventually has a single file (usually hostname.cfg) for each host, containing host definition and services.
E.g.
./system-live/template_live.cfg
./system-live/quantel/template_live_quantel.cfg
./system-live/quantel/bidir1.cfg
./system-live/quantel/clipcache06.cfg
./system-live/quantel/clipcache01.cfg
./system-live/midtier/template_live_midtier.cfg
./system-live/midtier/newsjtcapp02.cfg
./system-live/midtier/newsjtcapp23.cfg
./system-live/midtier/newsjtcapp11.cfg
./system-live/other/template_live_other.cfg
./system-live/other/newsjtcmpp26.cfg
./system-live/other/newsjtcvtr01.cfg
./system-live/other/newsjtcmpp16.cfg
./system-live/other/newsjtccodec04.cfg
--
Paul Weaver
Systems Development Engineer
> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net
> [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf
> Of Ronaldo A. Bueno Filho
> Sent: 11 September 2008 05:11
> To: Taylor Dondich
> Cc: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Nagios 3 structure
>
>
>
> Good! I will take a look.
> Is this like NagiosQL?
>
> In the future, I will install centreon 2. I think it will not
> be a problem, but just to confirm: is there any problem if I
> use centreon 2 if in the past I have used Lilac?
>
> Thanks
>
> --
> Ronaldo A. Bueno Filho
>
>
> --------- Mensagem Original --------
> De: Taylor Dondich <tdondich at gmail.com>
> Para: Ronaldo A. Bueno Filho <ronaldobf at linkway.com.br>
> Cópia: nagios-users at lists.sourceforge.net
> Assunto: Re: [Nagios-users] Nagios 3 structure
> Data: 10/09/08 12:33
>
> >
> > You could take a look at Lilac, a configuration tool I wrote. This
> > way you do not have to deal with the layout of the file
> structure, but
> > instead work inside an easy to use GUI. Lilac supports
> Nagios 3 and
> > full dependencies, escalations, etc. www.lilacplatform.com is the
> > project page.
> >
> > Otherwise, you can structure the files in any way you want. Don't
> > feel like you need to maintain the structure. You can ALWAYS move
> > them around at a later time, because the cfg_dir directive in the
> > Nagios main configuration file is recursive in nature, so
> changing it
> > later on will not disrupt it.
> >
> > Taylor
> >
> > On Wed, Sep 10, 2008 at 1:18 AM, Ronaldo A. Bueno Filho
> > <ronaldobf at linkway.com.br> wrote: >
> > >
> > > Hi people!
> > >
> > > The reason I am sending this e-mail is that I am not
> sure how I can
> organize
> > > the Nagios 3 structure.
> > > I just made a tree layout (shown below) showing how I thought
> > about
> the
> > > organization (folders and files).
> > > The environment consists in several customers, my own
> network and
> some other
> > > services that I can use someday, like to monitor web
> pages, etc.
> > > I must organize the files in order facilitate the management,
> > because
> I will
> > > update, change, delete and insert new services, customers,
> configurations
> > > and stuff.
> > >
> > > I also have some questions regarding host dependency, service
> dependency,
> > > host escalation and service escalation. These
> questions are after
> > the
> tree
> > > layout.
> > >
> > > objects (main folder)
> > > |
> > > |
> > > |--hosts (folder)
> > > | |--host_groups (folder)
> > > | | |--hostgroup1.cfg
> > > | | |--hostgroup2.cfg
> > > | | |--hostgroupn.cfg
> > > | |
> > > | |--own_corp (folder)
> > > | | |--corp_host1.cfg
> > > | | |--corp_host2.cfg
> > > | | |--corp_hostn.cfg
> > > | |
> > > | |--customers (folder)
> > > | |--customer1 (folder)
> > > | | |--cus1_host1.cfg
> > > | | |--cus1_host2.cfg
> > > | | |--cus1_hostn.cfg
> > > | |
> > > | |--customer2 (folder)
> > > | | |--cus2_host1.cfg
> > > | | |--cus2_host2.cfg
> > > | | |--cus2_hostn.cfg
> > > | |
> > > | |--customern (folder)
> > > | |--cusn_host1.cfg
> > > | |--cusn_host2.cfg
> > > | |--cusn_hostn.cfg
> > > |
> > > |--services (folder)
> > > | |--services_groups (folder)
> > > | | |--servicegroup1
> > > | | |--servicegroup2
> > > | | |--servicegroupn
> > > | |
> > > | |--services (folder)
> > > | |--service1
> > > | |--service2
> > > | |--servicen
> > > |
> > > |
> > > |--contacts (folder)
> > > | |--contactgroups (folder)
> > > | | |--contactgroup1.cfg
> > > | | |--contactgroup2.cfg
> > > | | |--contactgroupn.cfg
> > > | |
> > > | |--contacts (folder)
> > > | |--contact1.cfg
> > > | |--contact2.cfg
> > > | |--contacrn.cfg
> > > |
> > > |
> > > |--timeperiods (folder)
> > > | |--timeoeriod1.cfg
> > > | |--timeperiod2.cfg
> > > | |--timeperiodn.cfg
> > > |
> > > |
> > > |--commands (folder)
> > > | |--command1.cfg
> > > | |--command2.cfg
> > > | |--commandn.cfg
> > > |
> > > |
> > > |--templates (folder) #used just for reference
> > > |--serviceGroups.cfg
> > > |--services.cfg
> > > |--servicedependencies.cfg
> > > |--servicesescalations.cfg
> > > |--hostgroups.cfg
> > > |--hosts.cfg
> > > |--hostdependencies.cfg
> > > |--hostescalations.cfg
> > > |--contactgroups.cfg
> > > |--contacts.cfg
> > > |--timeperiods.cfg
> > > |--commands.cfg
> > >
> > >
> > >
> > > Questions:
> > >
> > > What is the better way to organize the host
> dependencies in order
> > to
> get
> > > easy the management?
> > > Maybe, is better to create a main file for each
> customer (within
> > the > customer folder) and fill it out with the dependency
> > statements. Or
> maybe I
> > > can use dependencies statements within each host cfg
> > file…
> or if you have a
> > > new idea...
> > >
> > > And about service dependency? It might has cases that some
> > service
> will have
> > > dependencies in a specific case and in other case, the same
> > service
> will not
> > > have this dependency. How to manage it? Do I create
> two services
> > with
> the
> > > same function, but with different dependencies? Where
> should I
> > store
> this
> > > information (what folder/file)?
> > >
> > > Now, about host escalation, should I create a file within each
> customer
> > > folder or should I put the escalation information
> within the host
> file, just
> > > adding statements? I ask it because there will have some cases
> > that I
> will
> > > use the escalation to a host group and sometime to a specific
> > host.
> What is
> > > the better way to manage it?
> > >
> > > And regarding service escalation, how can I manage it? Maybe,
> > there
> will
> > > have some cases that I have to escalate a service to a specific
> customer
> > > and, regarding the same service, I have not to
> escalate for other
> customers.
> > >
> > > e.g.: If a web service goes down, I want to escalate for the
> > customer
> X in 1
> > > hour and for customer Y, I want to escalate only after 3 hours
> > and
> the rest,
> > > I don't want to escalate.
> > >
> > > The last doubt I have regards the contacts. I will have some
> > cases
> that the
> > > customer desires to be informed or escalated automatically, for
> example, if
> > > the customer has a support team on site (field ops). In these
> > cases,
> how can
> > > I manage the contacts? I put it centralized or I
> create contact
> > files
> within
> > > each customer folder? Is there some suggestion?
> > >
> > >
> > > As you can see, my real doubt is about how to organize the cfg
> > files
> to turn
> > > easy the management and to maintain using the better way to do
> > so. I
> really
> > > appreciate if you can solve my doubts.
> > > It will solve problems like if I change a host name, I have to
> > update
> all
> > > references in other statements that make references to it,
> > including
> other
> > > files.
> > > I am thinking about to make a script to validate the changes
> > before
> putting
> > > it in production. It will avoid miss configurations like to
> > forget to
> delete
> > > some old reference to an inexistent host.
> > >
> > > I know, there are a lot of questions… I really
> > appreciate
> any hint and
> > > information.
> > >
> > > I have to say that I want to use centreon 2 and some
> application
> > like
> nagvis
> > > to create layout maps. I did not installed it now
> because I could
> > not
> run
> > > the statusmap module on centreon 2 with nagios 3.
> > > And about NagiosQL? Is it a good one?
> > >
> > > Thanks in advance
> > >
> > >
> > > --
> > > Ronaldo A. Bueno Filho
> > >
> > >
> > >
> > >
> > > --
> > > Essa mensagem foi verificada contra vírus e conteúdo malicioso
> > pelo
> Lisa Antivírus.
> > >
> > >
> > >
> --------------------------------------------------------------
> -----------
> > > This SF.Net email is sponsored by the Moblin Your Move
> > Developer's
> challenge
> > > Build the coolest Linux based applications with Moblin
> SDK &
> > win
> great prizes
> > > Grand prize is a trip for two to an Open Source event
> anywhere in
> > the
> world
> > > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > > _______________________________________________
> > > Nagios-users mailing list
> > > Nagios-users at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > > ::: Please include Nagios version, plugin version (-v) and OS
> > when
> reporting any issue.
> > > ::: Messages without supporting info will risk being sent to
> /dev/null
> > >
> >
> >
> >
> > --
> > Taylor Dondich
> > Check out Lilac, a configuration tool for Nagios 3 at
> > http://www.lilacplatform.com
> >
> > Check out my Shortcut with O'Reilly Press:
> > Network Monitoring with Nagios:
> > http://oreilly.com/catalog/9780596528195/index.html
> >
> >
> >
>
>
>
> --
> Essa mensagem foi verificada contra vírus e conteúdo
> malicioso pelo Lisa Antivírus.
>
>
> --------------------------------------------------------------
> -----------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge Build the coolest Linux based
> applications with Moblin SDK & win great prizes Grand prize
> is a trip for two to an Open Source event anywhere in the
> world http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS
> when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list