We are building our new Nagios 2014 environment and porting over our services and hosts. Having learned a lot for our first installation we are applying
that to our new environment. Every host has a host template and every service is tied to a service template and that to a hostgroup. That's the exciting part. My question
is about the actions component. We are using the actions component to link to escalation procedures if a device or service goes down. Is it possible to port over that information
to the new environment or do we need to recreate them?
Thanks,
Greg
Actions Component
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Actions Component
Some of the components changed how they were stored in the database somewhere along the way. From what version and to what version - specifically please.
The data is stored in the postgresql database, so if your jump is from a newish version that follows the newer format of the actions component then it should be doable to migrate.
The data is stored in the postgresql database, so if your jump is from a newish version that follows the newer format of the actions component then it should be doable to migrate.
Re: Actions Component
The actions component info is saved in the postgres db. It may be easiest to just go to the actions component page under Admin --> Manage components and copy the fields over to the new box. Otherwise, we may be able to come up with a query to just dump those few lines from postgres and insert them into the new db.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Actions Component
Thanks. We are going from 2012R2.9 to the latest 2014. So it sounds like the safest thing it to copy the fields over.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Actions Component
If you're cool with that as the solution we are too. To give you an idea of what the db entry that controls that looks like:
Code: Select all
nagiosxi=# select * from xi_options where name='actions_component_options';
option_id | name |
value
-----------+---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------
135 | actions_component_options | a:2:{s:7:"enabled";i:1;s:7:"actions";a:2:{i:0;a:12:{s:7:"enabled";i:1;s:4:"type";s:4:"host";s:4:"host";s:4:"/.*/";s:7:"service";s:0:"";s:9:"hostgroup";s:0:"";s:12:"servicegroup";s:0:"";s:11:"action_type";s:3:"url";s:3:"url";s:37:"http://www.googl
e.com/search?q=%host%";s:6:"target";s:6:"_blank";s:4:"text";s:25:"Search for host on Google";s:4:"code";s:192:"/*if((%objecttype%=='host' && '%hoststateid%'!='0') || (%objecttype%=='service' && '%servicestateid%'!='0')){$img='/nagiosxi/images/schedulecheck.png';$showlink=true;} else{$sh
owlink=false;}*/";s:3:"uid";s:6:"po0er4";}i:1;a:12:{s:4:"type";s:7:"service";s:4:"host";s:4:"/.*/";s:7:"service";s:4:"/.*/";s:9:"hostgroup";s:0:"";s:12:"servicegroup";s:0:"";s:11:"action_type";s:3:"url";s:3:"url";s:47:"http://www.google.com/search?q=%host%+%service%";s:6:"target";s:6:"_
blank";s:4:"text";s:28:"Search for service on Google";s:4:"code";s:192:"/*if((%objecttype%=='host' && '%hoststateid%'!='0') || (%objecttype%=='service' && '%servicestateid%'!='0')){$img='/nagiosxi/images/schedulecheck.png';$showlink=true;} else{$showlink=false;}*/";s:7:"enabled";i:0;s:3
:"uid";s:6:"guu3ls";}}}Re: Actions Component
Yes I am. Thanks for the additional information.
Greg
Greg