Page 1 of 1

<Solved> New Plugin but Custom Graph Template Not Being Used

Posted: Thu Feb 18, 2021 3:45 pm
by zephyr325
Hello -

I'm running the latest NagiosXI VM appliance (v 5.8.1) with pretty much a straight out-of-the-box config. I'm trying to use this plugin (https://exchange.nagios.org/directory/P ... pl/details (the 0.2 version) to manage/monitor core memory, which is compatible with XI. I built the command, and then a new service check using that command. The plugin is working just fine as far as pulling data. The plugin's name is check_netsnmp_metrics.pl, and the custom template's name is check_snmp_memory_linux.php.

My issue is with the rrd output/graph and trying to use the template that comes with it. The output isn't finding/using the template, and is just using the (default?) line graph. I can tell it's not using the custom template as well since it's not even using the custom template's header/axis titles.

I have:
  • - Uploaded the template with it's default name (check_snmp_memory_linux.php), verified that it's present in the /usr/local/nagios/share/pnp/templates directory. No luck.

    - Verified in the host's service monitoring data .XML file that the entry in <TEMPLATE>check_netsnmp_memory.pl</TEMPLATE>. In the pnp4nagios template documentation, it states that Nagios just appends a ".php" to the end of what's in that variable to find the custom template, so I renamed the template "check_netsnmp_memory.pl.php" and re-uploaded it; no luck.

    - I also renamed/uploaded the both the plugin (just "check_netsnmp_memory"), as well as the template ("check_netsnmp_memory.php") by dropping the ".pl" off of the plugin. I rebuild a new service check (it works fine) using that plugin/command, verified the <TEMPLATE> data as not having the .pl extension, so both the plugin and template should be exactly in sync with what the documentation says. Still no luck...the same standard Nagios graph template.
I'm not sure how to troubleshoot this any farther...any thoughts?

Thanks,

Re: New Plugin, but Custom Graph Template Not Being Invoked

Posted: Sat Feb 20, 2021 12:41 am
by zephyr325
So, I found the issue via this thread: https://webcache.googleusercontent.com/ ... clnk&gl=us

Apparently, Nagios defaults to using "HighCharts" which disables the use of custom templates. You can turn it off via Admin -> System Configs -> Theme & Display and then untick "Use HighCharts for performance graph displays...".

Re: <Solved> New Plugin but Custom Graph Template Not Being

Posted: Mon Mar 08, 2021 5:15 pm
by benjaminsmith
HI zephyr325,

Glad you got it worked out, and thank you for sharing your solution. We'll go ahead and close this out.

Cheers!
Benjamin