Page 1 of 2
how to add DISPLAY_NAME in MRTG graph Title
Posted: Thu Nov 13, 2014 1:26 pm
by zaji_nms
Dear Expert
I tried to add DISPLAY_NAME but failed. Appreciate your support.
File : check_xi_service_mrtgtraf.php (try to add extra field but no success)
$opt[1] = " --vertical-label \"Traffic $UNIT[1]\" -E --title \"$hostname / $servicedesc $display_name\" ";
Regards
Re: how to add DISPLAY_NAME in MRTG graph Title
Posted: Thu Nov 13, 2014 1:29 pm
by zaji_nms
able to modify the file but result is not what I was expecting , adding display_name after the service description
Nagios XI 2014R2.0
I hate new High Chart, still using old classic pnp graph. Old is gold but unable to add display_name on the title (I mean display name value(string) not appearing on the title along with service name)
Regards
Re: how to add DISPLAY_NAME in MRTG graph Title
Posted: Thu Nov 13, 2014 4:52 pm
by sreinhardt
Can you show us an example or screenshot of what you mean?
Re: how to add DISPLAY_NAME in MRTG graph Title
Posted: Thu Nov 13, 2014 5:10 pm
by cmerchant
it should be $HOSTDISPLAYNAME or $SERVICEDISPLAYNAME, not display_name.
Ref:
http://nagios.sourceforge.net/docs/3_0/macrolist.html
unless you have created custom macros.
Re: how to add DISPLAY_NAME in MRTG graph Title
Posted: Fri Nov 14, 2014 10:10 am
by zaji_nms
Dear Expert
from CCM, via web, in the service config , left side there is main three field/rows
Config Name*
Description*
Display Name <<<<< this $display_name (our customer link info) working fine from below little edited php
This is very simple, why NAGIOS still missing (leave it this complaint as we achieved by our Expert)
ajaxhelpers-hoststatus.inc.php
ajaxhelpers-servicestatus.inc.php
nocscreenapi.php
$output.=sorted_table_header($sortby,$sortorder,"display_name","Display Name",$extra_args,"",$url);
<td>".$service_name_cell."</td><td>".$display_name."</td><td class='".$service_status_class."
but not working from ==> check_xi_service_mrtgtraf.php
I did but no success => $opt[1] = " --vertical-label \"Traffic $UNIT[1]\" -E --title \"MRTG $hostname / $servicedesc $SERVICEDISPLAYNAME\" ";
Regards
Re: how to add DISPLAY_NAME in MRTG graph Title
Posted: Fri Nov 14, 2014 10:43 am
by zaji_nms
Dear Expert
Need display_name in the MRTG (interface bandwidth graph) attached
Regards
Re: how to add DISPLAY_NAME in MRTG graph Title
Posted: Fri Nov 14, 2014 3:06 pm
by abrist
The graph title is not generated by the php, but is pulled from the rrd/pnp xml. . . I don't think this is possible, especially with the pnp graphs (there may be more options that can be edited with the highcharts graphs.
Re: how to add DISPLAY_NAME in MRTG graph Title
Posted: Fri Nov 14, 2014 4:08 pm
by zaji_nms
Dear Abrist
me sure , title from here ==> check_xi_service_mrtgtraf.php ,, as I played with this file adding/removing some fixed string working fine but I want dynamically fetch DISPLAY_NAME (or whatsoever $SERVICEDISPLAYNAME)
I don't think we will use HighChart anytime in long or near future, this classic PNP really very very good, I like it, there is little confusion at Y-Axis values but it compensate with X-Axis.
If you check with some your colleague or can you escalate, may be possible in next upgrade.
Regards
Re: how to add DISPLAY_NAME in MRTG graph Title
Posted: Fri Nov 14, 2014 9:53 pm
by Box293
Whatever is in the XML file can be referenced in the PNP graphs.
I think you are after:
$NAGIOS_DISP_HOSTNAME
or
$NAGIOS_DISP_SERVICEDESC
Use my Performance Data Tool to browse perfdata and click on one of the XML files, it will display it in a popup window.
http://exchange.nagios.org/directory/Ad ... ol/details
Re: how to add DISPLAY_NAME in MRTG graph Title
Posted: Sat Nov 15, 2014 12:44 pm
by zaji_nms
Dear Box293
more /usr/local/nagios/var/objects.cache | grep -i hostdisplayname <<<< Yes There is Result
more /usr/local/nagios/var/objects.cache | grep -i servicedisplayname <<< No, no result
me new to Nagios and Web/PHP programming but trying with your tips.
I tried with your suggestion to use $NAGIOS_DISP_SERVICEDESC but no success.
Regards