[Fwd: Syncing configs between 2 nagios servers -permissions]

John P. Rouillard rouilj at cs.umb.edu
Sat Sep 2 01:26:07 CEST 2006


In message <CD18C81835E18A40A64C4A0D16A237BE0575AEE9 at ataexc01.americas.cpqcorp.
net>,
"Morris, Patrick" writes:
>> 	I have 2 nagios servers that will be setup as 
>> redundant, if nagios1 is down, nagios2 will enable its checks 
>> + alert.  Using NSCA, I can sync the state, but I now have a 
>> problem to sync the config and plugin directory.
>> 
>> 	The easiest way to sync would be to have all the files 
>> in /etc/nagios/ and /usr/lib(64)/nagils/plugins/ owned by the 
>> user who does the sync.
>> Could I do a chown nagios:nagios on all those files?
>> 
>> If someone has a better idea, I welcome it!
>
>I do that on a few machines.  The only potential snag (one that I have
>to deal with) is if you have Nagios boxes running different OS versions,
>in which case synching your plugins can be a bad idea.
>
>Configs aren't a problem in any case, as long as you make sure they're
>readable when they arrive. 

Patrick, I assume you must have your two nagios server co-located at
the same site and connected to the same switches. Otherwise do you
have a method for rewriting your configs to change the parent
directives to match the view from your backup/remote nagios machine.

Also if you have local commands that are run on the nagios server
rather than remote probes (such as nrpe or check_by_ssh), how do you
define these entries in your services file? E.G. I have a stanza

  define service{
        service_description     DiskRootCheck
        hostgroup_name          standard_linux_services,!standard_linux_services
-dev
        host_name               !nag1
        use                     generic-service
        check_command           check_by_ssh!check_disk!-w 10% -c 5% -p /
        servicegroups           check_by_ssh
        normal_check_interval   2
        }
  define service{
        service_description     DiskRootCheck
        hostgroup_name          standard_linux_services-dev
        use                     generic-service
        check_command           check_by_ssh!check_disk!-w 10% -c 5% -p /
        servicegroups           check_by_ssh
        contact_groups          renesys-admins-nopage
        normal_check_interval   2
        }
  define service{
        service_description     DiskRootCheck
        host_name               nag1
        use                     generic-service
        check_command           check_local_disk!10%!5%!-p /
        }

I need to change all the "nag1" (which is the primary nagios server)
host names to "nag2" which is the backup server (located 1500 miles
from the primary server). How are yours set up so that you don't have
to change the config files and still cross monitor the machines?

				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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