Hi Brian, I have the same problem generating action_url content dynamically from hostname, service_description and Custom variables. While variables in URL fields are correctly interpreted in Icinga classic ui, they aren't on their way to icinga Web. There is a new feature adressing this, hopefully released soon.
Kind regards, Marco Hoyer > Am 05.02.2014 um 18:20 schrieb "Brian O'Neill" <[email protected]>: > > Bumping in case this got missed on the weekend. Appreciate any pointers to > what I need to do where... > > >> On 1/31/2014 10:31 AM, Brian O'Neill wrote: >> I'm setting up multiple icinga servers in various locations with >> PNP4Nagios at each location, and setting up Icinga Web as a "single pane >> of glass" at a central location. I've got the IDO stuff working fine. >> >> I'm trying to figure out the best way to integrate the PNP graphs from >> the different locations with Icinga Web - I've tried a few different >> ways, but none have worked so far. Mostly I'm running into macros that >> don't expand in the action URL (like $USERx$), and it doesn't seem like >> macro substitutions are done before the URL is sent to icinga-web anyways. >> >> So I'm looking at the existing PNP integration cronk, where the graph >> URL is harcoded to a local PNP4Nagios installation. I see it does it's >> own macro expansion: >> >> <parameter >> name="src"><![CDATA[/pnp4nagios/image?host={host_name}&srv={service_name}&view=0]]></parameter> >> >> >> So ideally, I could include another macro in there based off the >> collector name, or at a minimum a customvar. I tried to define a >> customvar like "_MONFQDN" in the host, and I can see that it appears in >> Customvars in Icinga Web as MONFQDN, but I'm a bit at a loss for being >> able to use it. >> >> I tried creating this in the <fields> section: >> >> <field name="host_monfqdn"> >> <datasource> >> <parameter name="field">HOST_MONFQDN</parameter> >> </datasource> >> <display> >> <parameter name="visible">true</parameter> >> <parameter name="label">Monitoring >> host</parameter> >> <parameter name="width">150</parameter> >> </display> >> <filter> >> <parameter name="enabled">false</parameter> >> </filter> >> >> <order> >> <parameter name="enabled">false</parameter> >> <parameter name="default">false</parameter> >> </order> >> </field> >> >> And changing the URL to: >> >> <parameter >> name="url"><![CDATA[http://{host_monfqdn}/pnp4nagios/index.php/graph?host={host_name}&srv={service_name}]]></parameter> >> >> >> But not only doesn't it get used, but it drops a slash: >> >> http://pnp4nagios/index.php/graph?host=testhost&srv=CPU >> >> I could be missing something, or it might not be possible and I have to >> rethink how to do it altogether (rsync RRD files to the central server?) >> >> Thanks for any insight... >> >> -Brian >> _______________________________________________ >> icinga-users mailing list >> [email protected] >> https://lists.icinga.org/mailman/listinfo/icinga-users > _______________________________________________ > icinga-users mailing list > [email protected] > https://lists.icinga.org/mailman/listinfo/icinga-users _______________________________________________ icinga-users mailing list [email protected] https://lists.icinga.org/mailman/listinfo/icinga-users
