script_server.php question

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
osiris123d
Cacti User
Posts: 59
Joined: Fri Mar 23, 2007 3:38 pm

script_server.php question

Post by osiris123d »

I am trying to create some Templates for OpenSIPS and I have a question. I set up a php script by following this article
http://remarks.peurat.net/integrating-o ... ng-xmlrpc/

I test my script by doing this

root@debian:/usr/share/cacti/site# php script_server.php
PHP Script Server has Started - Parent is cmd
/usr/local/share/cacti/scripts/ss_OpensipsXmlrpcStat.php ss_OpensipsXmlrpcStat sip.ae.com 8000 active_dialogs
dialog_:0

You can see the scripts output in bold. I went ahead and created a Data Template and then a Graph Template but when I add the Graph Template to a host it doesn't graph anything. The graph just has nan on it.

I am wondering how I can troubleshoot this. Is the output in bold correct? Is there a special way to create the Data Template for PHP Script outputs? Any help is appreciated.

Thanks
osiris123d
Cacti User
Posts: 59
Joined: Fri Mar 23, 2007 3:38 pm

Re: script_server.php question

Post by osiris123d »

I did a medium debug and I see that the script is running correctly

05/07/2012 02:10:02 PM - CMDPHP: Poller[0] Host[3] DS[30] SERVER: /usr/local/share/cacti/scripts/ss_OpensipsXmlrpcStat.php ss_OpensipsXmlrpcStat sip.ae.com 8000 active_dialogs, output: dialog_:1

So there has to be something wrong with my Data Template or Graph Template.

For my Data Input Method I just added one Output Field called "calls" and named it Concurrent Calls and checked the "Update RRD File"

For the Data Template I created "OpenSIPS - Active Calls" and checked "Use Per-Data Source Value), selected my script as the Data Input Method, set the step to 300, checked Data Source Active, created a Data Source Item called "active_calls" with min value 0, max value 0, Data Source Type Gauge, Output Field "calls - Concurrent Calls

Then I created the "OpenSIPS - Active Calls" Graph Template by copying one from the existing "Host MIB - Logged in Users" graph template.

So I'm not sure why it isn't graphing.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests