Discussion:
Using action_url from icinga service definition in icinga-web
Marco Hoyer
2013-03-14 17:05:38 UTC
Permalink
Hello all,

I've read something about how to pnp4nagios in Icinga-Web.
Using snipplets in icinga-web/app/modules/Cronks/data/xml/extensions is a straight forward way.
I now want to have some complex urls getting queried when I click on the perfdata Icon to integrate Graphite (http://graphite.wikidot.com/).
My idea was to configure the url as the services action_url parameter and add this to be used in the template like this:

<parameter>
<parameter name="namespace">Cronk.grid.IcingaColumnRenderer
</parameter>
<parameter name="function">imagePopup</parameter>

renderer/gridevent[cellclick|celldblclick|...]
<parameter name="type">cellclick</parameter>

<parameter name="arguments">
<parameter name="booleanConfitionField">pnp4nagios_service_image_hover
</parameter>
<parameter name="title">Image for
{host_name}</parameter>
<parameter name="url"><![CDATA[{service_action_url}]]></parameter>
<parameter name="width">500</parameter>
<parameter name="height">300</parameter>
</parameter>
</parameter>

Problem is, that I can't see anything. The variable is empty.
Is there anyone being able to give me an advice on how to do something like this?

king regards
Marco Hoyer
Michael Friedrich
2013-03-14 17:36:24 UTC
Permalink
Post by Marco Hoyer
Hello all,
I've read something about how to pnp4nagios in Icinga-Web.
versions used?
Post by Marco Hoyer
Using snipplets in icinga-web/app/modules/Cronks/data/xml/extensions
is a straight forward way.
I now want to have some complex urls getting queried when I click on
the perfdata Icon to integrate Graphite (http://graphite.wikidot.com/).
My idea was to configure the url as the services action_url parameter
<parameter>
<parameter name="namespace">Cronk.grid.IcingaColumnRenderer
</parameter>
<parameter name="function">imagePopup</parameter>
renderer/gridevent[cellclick|celldblclick|...]
<parameter name="type">cellclick</parameter>
<parameter name="arguments">
<parameter name="booleanConfitionField">pnp4nagios_service_image_hover
</parameter>
<parameter name="title">Image for
{host_name}</parameter>
<parameter name="url"><![CDATA[*{service_action_url}*]]></parameter>
<parameter name="width">500</parameter>
<parameter name="height">300</parameter>
</parameter>
</parameter>
Problem is, that I can't see anything. The variable is empty.
Is there anyone being able to give me an advice on how to do something like this?
king regards
Marco Hoyer
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
icinga-users mailing list
https://lists.sourceforge.net/lists/listinfo/icinga-users
--
DI (FH) Michael Friedrich

mail: michael.friedrich-***@public.gmane.org
twitter: https://twitter.com/dnsmichi
jabber: dnsmichi-***@public.gmane.org
irc: irc.freenode.net/icinga dnsmichi

icinga open source monitoring
position: lead core developer
url: https://www.icinga.org
Markus Frosch
2013-03-14 19:57:55 UTC
Permalink
Hello Marco,
Basically, your problem is that the field action_url is not selected for
this grid.

The other problem is that macro replacing is not that easy in Icinga Web.

I've made a quick example from existing code I wrote lately, though not
tested in this example module. Please be aware that the modules are
namespace depending.

https://github.com/lazyfrosch/icinga-web-cronks/tree/master/UrlExample

One quick note: there is a bug in 1.8.1 which causes notes_url to not be
selected from the database - fixed in 1.8.2

Have fun
Markus
Post by Marco Hoyer
Hello all,
I've read something about how to pnp4nagios in Icinga-Web.
Using snipplets in icinga-web/app/modules/Cronks/data/xml/extensions is a
straight forward way.
I now want to have some complex urls getting queried when I click on the
perfdata Icon to integrate Graphite (http://graphite.wikidot.com/).
My idea was to configure the url as the services action_url parameter and
<parameter>
<parameter
name="namespace">Cronk.grid.IcingaColumnRenderer
</parameter>
<parameter name="function">imagePopup</parameter>
renderer/gridevent[cellclick|celldblclick|...]
<parameter name="type">cellclick</parameter>
<parameter name="arguments">
<parameter
name="booleanConfitionField">pnp4nagios_service_image_hover
</parameter>
<parameter name="title">Image for
{host_name}</parameter>
<parameter name="url"><![CDATA[*
{service_action_url}*]]></parameter>
<parameter name="width">500</parameter>
<parameter name="height">300</parameter>
</parameter>
</parameter>
Problem is, that I can't see anything. The variable is empty.
Is there anyone being able to give me an advice on how to do something like this?
king regards
Marco Hoyer
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
icinga-users mailing list
https://lists.sourceforge.net/lists/listinfo/icinga-users
--
Markus Frosch
markus-***@public.gmane.org
http://www.lazyfrosch.de
Marco Hoyer
2013-03-18 08:33:24 UTC
Permalink
@Markus
Thank you, I will have a look at it.

@Michael
Sorry, next time I will try to remember...

Icinga: 1.8.4
Icinga-web: 1.8.2

Kind regards,
Marco

Am 14.03.2013 um 20:57 schrieb Markus Frosch:

Hello Marco,
Basically, your problem is that the field action_url is not selected for this grid.

The other problem is that macro replacing is not that easy in Icinga Web.

I've made a quick example from existing code I wrote lately, though not tested in this example module. Please be aware that the modules are namespace depending.

https://github.com/lazyfrosch/icinga-web-cronks/tree/master/UrlExample

One quick note: there is a bug in 1.8.1 which causes notes_url to not be selected from the database - fixed in 1.8.2

Have fun
Markus

2013/3/14 Marco Hoyer <m.hoyer-AXfm/***@public.gmane.org<mailto:m.hoyer-AXfm/***@public.gmane.org>>
Hello all,

I've read something about how to pnp4nagios in Icinga-Web.
Using snipplets in icinga-web/app/modules/Cronks/data/xml/extensions is a straight forward way.
I now want to have some complex urls getting queried when I click on the perfdata Icon to integrate Graphite (http://graphite.wikidot.com/).
My idea was to configure the url as the services action_url parameter and add this to be used in the template like this:

<parameter>
<parameter name="namespace">Cronk.grid.IcingaColumnRenderer
</parameter>
<parameter name="function">imagePopup</parameter>

renderer/gridevent[cellclick|celldblclick|...]
<parameter name="type">cellclick</parameter>

<parameter name="arguments">
<parameter name="booleanConfitionField">pnp4nagios_service_image_hover
</parameter>
<parameter name="title">Image for
{host_name}</parameter>
<parameter name="url"><![CDATA[{service_action_url}]]></parameter>
<parameter name="width">500</parameter>
<parameter name="height">300</parameter>
</parameter>
</parameter>

Problem is, that I can't see anything. The variable is empty.
Is there anyone being able to give me an advice on how to do something like this?

king regards
Marco Hoyer

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
icinga-users mailing list
icinga-users-5NWGOfrQmneRv+***@public.gmane.org<mailto:icinga-users-5NWGOfrQmneRv+LV9MX5uv+2+***@public.gmane.orgt>
https://lists.sourceforge.net/lists/listinfo/icinga-users




--
Markus Frosch
markus-***@public.gmane.org<mailto:markus-***@public.gmane.org>
http://www.lazyfrosch.de<http://www.lazyfrosch.de/>

Loading...