NagiosXI and Pagerduty

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jparker
Posts: 10
Joined: Fri Mar 16, 2012 12:37 pm

NagiosXI and Pagerduty

Post by jparker »

I am trying to setup pagerduty with its nagios integration listed in this guide here.
http://www.pagerduty.com/docs/guides/na ... tion-guide

I noticed this thread and commented in it about the issues I am having with the guided steps that Scott Wilkerson kinda revised to reflect the differences in NagiosXI http://support.nagios.com/forum/viewtop ... t=5537&e=0

I am getting an error applying the configuration once adding "pagerduty" to the nagios configurations as a contact.

this is the error I am getting from the log:


Processing object config file '/usr/local/nagios/etc/pagerduty_nagios.cfg'...
Warning: Duplicate definition found for contact 'pagerduty' (config file '/usr/local/nagios/etc/pagerduty_nagios.cfg', starting on line 1)
Error: Could not add object property in file '/usr/local/nagios/etc/pagerduty_nagios.cfg' on line 2.
Error processing object config files!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI and Pagerduty

Post by scottwilkerson »

If you add the file to your nagios.cfg like this

Code: Select all

cfg_file=/usr/local/nagios/etc/pagerduty_nagios.cfg
You need to make sure you do not have a contact in the CCM with the same contact name
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jparker
Posts: 10
Joined: Fri Mar 16, 2012 12:37 pm

Re: NagiosXI and Pagerduty

Post by jparker »

Yes I added that line to the nagios.cfg.

Your next steps after adding that line to nagios.cfg is to:

"Add the contact “pagerduty” to your Nagios configuration’s main contact group.

Create User pagerduty and add them to the admins contactgroup"

Do I not put down pagerduty? Do I make up a new name?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: NagiosXI and Pagerduty

Post by mguthrie »

I'm guessing this contact is also in the Core Config Manager. Can you access the Core Config Manager->Contacts page, then click the "Download" button and send us that config (private data removed). I'm guessing the contact may have ended up in there as well.
jparker
Posts: 10
Joined: Fri Mar 16, 2012 12:37 pm

Re: NagiosXI and Pagerduty

Post by jparker »

Well right now I removed pagerduty contact because I was getting that error when I applied the configuration. I re-added it and placed it here. Also I included the configuration error log.
You do not have the required permissions to view the files attached to this post.
Last edited by jparker on Tue Jun 19, 2012 3:42 pm, edited 1 time in total.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosXI and Pagerduty

Post by lmiltchev »

I believe you are getting a config error, because you need to have "pagerduty_notification_times" in your config, so instead of this:

Code: Select all

host_notification_period      		nagiosadmin_notification_times
service_notification_period   		nagiosadmin_notification_times
you should have this:

Code: Select all

host_notification_period      		pagerduty_notification_times
service_notification_period   		pagerduty_notification_times
Note: You should modify this through the Core Config Manager.

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jparker
Posts: 10
Joined: Fri Mar 16, 2012 12:37 pm

Re: NagiosXI and Pagerduty

Post by jparker »

I just made the changes but are getting the same results
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosXI and Pagerduty

Post by lmiltchev »

Can you apply configuration? Do you get any config errors when you run the Write Config Tool?

http://assets.nagios.com/downloads/nagi ... tabase.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
jparker
Posts: 10
Joined: Fri Mar 16, 2012 12:37 pm

Re: NagiosXI and Pagerduty

Post by jparker »

When I click the Write additional data I get this error:

Warning, always check the configuration files before restarting Nagios!


Write timeperiods.cfg ...
Configuration file successfully written!
Write commands.cfg ...
Configuration file successfully written!
Write contacts.cfg ...
Configuration file successfully written!
Write contactgroups.cfg ...
Configuration file successfully written!
Write contacttemplates.cfg ...
Configuration file successfully written!
Write servicedependencies.cfg ...
Configuration file successfully written!
Write hostdependencies.cfg ...
Configuration file successfully written!
Write serviceescalations.cfg ...
Configuration file successfully written!
Write hostescalations.cfg ...
Configuration file successfully written!
Write serviceextinfo.cfg ...
Configuration file successfully written!
Write hostextinfo.cfg ...
Configuration file successfully written!

When I click the Check configuration files I get this error:

Warning: Duplicate definition found for contact 'pagerduty' (config file '/usr/local/nagios/etc/pagerduty_nagios.cfg', starting on line 1)
Error: Could not add object property in file '/usr/local/nagios/etc/pagerduty_nagios.cfg' on line 2.
Error processing object config files!


Nagios Core 3.4.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 05-11-2012
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/xxxxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/xxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/xxxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/xxxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/xxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/xxxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/xxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/hosts/localhost.cfg'...
Processing object config directory '/usr/local/nagios/etc/services'...
Processing object config file '/usr/local/nagios/etc/services/xxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/services/xxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/services/xxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/services/xxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/services/xxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/services/xxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/services/xxxxxx.cfg'...
Processing object config file '/usr/local/nagios/etc/services/localhost.cfg'...
Processing object config file '/usr/local/nagios/etc/pagerduty_nagios.cfg'...
Warning: Duplicate definition found for contact 'pagerduty' (config file '/usr/local/nagios/etc/pagerduty_nagios.cfg', starting on line 1)
Error: Could not add object property in file '/usr/local/nagios/etc/pagerduty_nagios.cfg' on line 2.
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
Last edited by jparker on Tue Jun 19, 2012 3:41 pm, edited 1 time in total.
jparker
Posts: 10
Joined: Fri Mar 16, 2012 12:37 pm

Re: NagiosXI and Pagerduty

Post by jparker »

Oh wait that first one isnt a error, its just my lack of reading it thoroughly.
Locked