nagios writing escalation rules multiple times to objects.cache
Chris Baldwin
oogs at umich.edu
Tue Oct 2 17:14:50 CEST 2012
Well, I fixed the issue - as Andreas pointed out, it's a config issue
related to having host_name & servicegroup_name defined in my
escalations. I edited my rules, making them host agnostic, and now I do
not have duplicates in my objects.cache. I also reduced the raw number
of them - since they aren't tied to a particular host anymore, I don't
need as many config files.
Thanks!
-Chris B.
On 10/2/12 5:06 AM, Andreas Ericsson wrote:
> On 10/01/2012 09:37 PM, Chris Baldwin wrote:
>> Short version:
>>
>> I have an ever-growing Nagios install for monitoring a bunch of linux
>> hosts (currently 99 hosts & 2322 services, I plan on adding 115 more
>> hosts & 1500+ services). I've noticed something odd with my escalation
>> rules - they're being repeated multiple times in my objects.cache file.
>> This is started to affect performance for parts of my nagios install, to
>> the point where it's painfully slow to use the web interface.
>>
>> My google-fu is weak today, so I was hoping someone here could point me
>> in the right direction.
(I edited out a lot of stuff here for legibility)
>>
>> The cfg files look something like this:
>>
>> define serviceescalation{
>> contact_groups the_boss
>> escalation_options c,r
>> escalation_period oncall_hours
>> first_notification 12
>> host_name my.hostname.xyz
>> last_notification 0
>> notification_interval 60
>> #service_description
>> Disk,Ping,HTTP,Load,MySQL,Ping,Procs,SSH,Swap,Users,Zombie
>> servicegroup_name
>> Disk,Ping,HTTP,Load,MySQL,Ping,Procs,SSH,Swap,Users,Zombie
>> }
>>
> So you're assigning it to a host_name along with a set of servicegroups.
> I'm not entirely sure that makes 100% sense, since servicegroup members
> already have a host_name.
>
> It might work better with Nagios 4, but I'm not sure. If it doesn't,
> I'll fix it so 'service_description' is required when 'host_name' or
> 'hostgroup_name' is set, as I don't see how one makes sense without
> the other.
>> My questions to you guys:
>> - Am I crazy to think that it's reading every rule once for *each*
>> server?
> It seems as if it's reading the rule once for each host mentioned in
> host_name and then assigning it to each member of the servicegroups
> listed, so if you have identical escalations assigned to the same set
> of servicegroups then this is really how you're configuring your
> Nagios.
>
> Nagios 4 has provisions to compare slave objects and avoid adding
> multiple ones, which would hide a potential bug in your config. It's
> currently only used for dependencies, but making it work with
> escalations too would be the final fallback to fix this.
>
> However, I urge you to look over your configuration first to make
> sure you don't really have multiple escalations assigned to the
> same set of servicegroups.
>
>> I tried using the precache, it didn't help. Both files were created by
>> my nagios install.
> That's not surprising, as precaching and caching uses the exact same
> code.
>
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
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