Opened 8 years ago

Closed 8 years ago

#176 closed incident (fixed)

nagios update script fout

Reported by: huub Owned by: rick
Keywords: Cc:
Location: Generiek

Description

Het nagios update script op sunny geeft een foutmelding op 'interfaces':

sunny# ../tools/yaml2nag.py >/usr/local/etc/nagios/objects/nodes.cfg
Traceback (most recent call last):

File "../tools/yaml2nag.py", line 138, in <module>

main()

File "../tools/yaml2nag.py", line 122, in main

interfaces = get_up_interfaces(v, 'iface-')

File "../tools/yaml2nag.py", line 70, in get_up_interfaces

for inf in nodeinterfaces?.split(','):

KeyError?: 'interfaces'

Change History (7)

comment:1 Changed 8 years ago by rick

Owner: changed from richardvm to rick
Status: newaccepted

comment:2 Changed 8 years ago by rick

In 10388:

Revamp to fit gformat framework. This should fix this missing interfaces keys.

Related-To: beheer #176

comment:3 Changed 8 years ago by huub

na revisie 10388 geen foutmelding van script maar foutmelding bij herstarten van nagios:

....
Processing object config file '/usr/local/etc/nagios/objects/commands.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/contacts.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/templates.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/localhost.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/nodes.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/proxies.cfg'...
Processing object config file '/usr/local/etc/nagios/objects/nanostations.cfg'...
Error: Could not find any hostgroup matching 'node-ileiden' (config file '/usr/local/etc/nagios/objects/nodes.cfg', starting on line 812)

Error processing object config files!

comment:4 Changed 8 years ago by rick

Bedank voor de feedback, maar ik was nog niet klaar. Was even aan mijn paasontbijt gegaan ;-)

comment:5 Changed 8 years ago by rick

In 10391:

Fix typo in hostgroup.

While here, fix the wrong key autogen_fqdn and introduce autogen_realname which does this the proper way.

Related-To: beheer#176

comment:6 Changed 8 years ago by rick

In 10393:

Include proxies.cfg in the autogenerator as well, makes parsing more easy.

Related-To beheer#176

comment:7 Changed 8 years ago by rick

Resolution: fixed
Status: acceptedclosed

Script rewritten to use the gformat lib instead. Added bonus; proxies are now also autogenerated.

Note: See TracTickets for help on using tickets.