Page 1 of 1
Actions Component
Posted: Fri May 15, 2015 10:26 am
by gregwhite
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
Re: Actions Component
Posted: Fri May 15, 2015 10:54 am
by jdalrymple
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.
Re: Actions Component
Posted: Fri May 15, 2015 10:56 am
by abrist
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.
Re: Actions Component
Posted: Fri May 15, 2015 12:36 pm
by gregwhite
Thanks. We are going from 2012R2.9 to the latest 2014. So it sounds like the safest thing it to copy the fields over.
Re: Actions Component
Posted: Fri May 15, 2015 12:45 pm
by jdalrymple
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
Posted: Fri May 15, 2015 2:22 pm
by gregwhite
Yes I am. Thanks for the additional information.
Greg