Actions component - unexpected behaviour

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

Actions component - unexpected behaviour

Post by mon-team »

Hi team

I have configured the action component to get Schelude downtime, actions_url, notes_url, and notes accessible under "Quick Actions".
[img]actions_config.PNG[/img]

When the istruction "... {$showlink=false;}" is applied, all the actions declared after this one don't appear under "Quick Actions" while the expected result is to hide only the action which the code referes to.

It seems that the "$showlink=false;" is applied to the related action and to any other actions defined after it.

Best Regards
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Actions component - unexpected behaviour

Post by tmcdonald »

Try putting "$showlink=true;" at the top of the next one that needs to show links and see if that helps. This might somewhat be a bug, I just want to confirm whether this is the case.
Former Nagios employee
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

Re: Actions component - unexpected behaviour

Post by mon-team »

Try putting "$showlink=true;" at the top of the next one that needs to show links and see if that helps
doesn't resolve the issue.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Actions component - unexpected behaviour

Post by lmiltchev »

I was able to recreate the issue and just filed an internal bug report (TASK ID 4958).

Update: Try this "patched" component - download the file below:
actions.zip
Don't unzip it. Install it as you would install any other component:

Admin->Manage Components->Browse->actions.zip->Upload Component

Let us know if this fixed your problem.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

Re: Actions component - unexpected behaviour

Post by mon-team »

It works fine now! Thank you.
Let me ask you another question about action component. It is possible to get macros %servicegroupname% and %hostgroupname% available for this component?

Best Regards
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Actions component - unexpected behaviour

Post by abrist »

mon-team wrote:t is possible to get macros %servicegroupname% and %hostgroupname% available for this component?
Not currently, but I opened a feature request on our internal tracker:

Code: Select all

TASK ID 5078 - Nagios XI Feature Request: XI: Add servicegroupname and hostgroupname macros to the actions component
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.
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

Re: Actions component - unexpected behaviour

Post by mon-team »

I would like to get these information querying the database "nagios".
I can get all servicegroup_object_id associated to a specific service but not the related servicegroup_name.

Could you give me the query to execute?

Thanks
BR
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Actions component - unexpected behaviour

Post by abrist »

Can you post the current query you are using?
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.
mon-team
Posts: 171
Joined: Thu Jun 28, 2012 9:22 am

Re: Actions component - unexpected behaviour

Post by mon-team »

abrist wrote:Can you post the current query you are using?

Code: Select all

SELECT servicegroup_object_id FROM nagios_servicegroups f JOIN (SELECT g.servicegroup_id,s.service_object_id FROM nagios_servicegroup_members g JOIN (SELECT display_name,service_object_id FROM nagios_services WHERE display_name LIKE '" . $_GET["service"] . "' AND host_object_id=(SELECT host_object_id FROM nagios_hosts WHERE display_name LIKE '" . $_GET["host"] . "')) s ON s.service_object_id=g.service_object_id)  q ON q.servicegroup_id=f.servicegroup_id
How can i find out the association servicegroup_object_id - servicegroup_name?

Code: Select all

mysql> desc nagios_servicegroups;
+------------------------+--------------+------+-----+---------+----------------+
| Field                  | Type         | Null | Key | Default | Extra          |
+------------------------+--------------+------+-----+---------+----------------+
| servicegroup_id        | int(11)      | NO   | PRI | NULL    | auto_increment |
| instance_id            | smallint(6)  | NO   | MUL | 0       |                |
| config_type            | smallint(6)  | NO   |     | 0       |                |
| servicegroup_object_id | int(11)      | NO   |     | 0       |                |
| alias                  | varchar(255) | NO   |     |         |                |
+------------------------+--------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

mysql> desc nagios_servicegroup_members;
+------------------------+-------------+------+-----+---------+----------------+
| Field                  | Type        | Null | Key | Default | Extra          |
+------------------------+-------------+------+-----+---------+----------------+
| servicegroup_member_id | int(11)     | NO   | PRI | NULL    | auto_increment |
| instance_id            | smallint(6) | NO   |     | 0       |                |
| servicegroup_id        | int(11)     | NO   | MUL | 0       |                |
| service_object_id      | int(11)     | NO   |     | 0       |                |
+------------------------+-------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Actions component - unexpected behaviour

Post by abrist »

You need to join the nagios.servicegroups.service_object_id with the nagios.nagios_objects.object_id field - select name1 from nagios_objects.
Does that make sense?
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.
Locked