Graphing in a different SNMP port
Moderators: Developers, Moderators
Graphing in a different SNMP port
hi,
just installed my Cacti and I would say it rocks.... but having problem
graphing from a different SNMP port. Actually I would like to graph a
program or an SNMP agent that our developer created to monitor no. of
calls in our iPBX . This uses a different port and OID so as not to
conflict with the net-snmp installed on the same system. I've used the
SNMP - Generic OID Template but it does not tell what new port to use.
Kindly let me know if this is possible. Thanks.
Shingouki
just installed my Cacti and I would say it rocks.... but having problem
graphing from a different SNMP port. Actually I would like to graph a
program or an SNMP agent that our developer created to monitor no. of
calls in our iPBX . This uses a different port and OID so as not to
conflict with the net-snmp installed on the same system. I've used the
SNMP - Generic OID Template but it does not tell what new port to use.
Kindly let me know if this is possible. Thanks.
Shingouki
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
In the UI and in cmd.php, yes. Today in Cactid, no. I am just about to release that update.
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
shingouki wrote:hi,
thanks for the reply. kindly let me know as soon as its released, or perhaps there is another quick workaround. again many thanks.
hi,
just read that its possible to do it via Data Input Methods, just created my simple scripts but was confused on how I can invoke it and then graph the data that was run by the scripts. Would appreciate any enlightment. Many thanks.
Shingouki
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Shingouki,shingouki wrote:just read that its possible to do it via Data Input Methods, just created my simple scripts but was confused on how I can invoke it and then graph the data that was run by the scripts. Would appreciate any enlightment. Many thanks.
there is a documentation on this: http://www.cacti.net/downloads/docs/htm ... PUT_METHOD
In your case, I'd say a single shell script should to the trick. You may provide hostname/IP address, community string and OID to it (perhaps you'll like to provide the SNMP port, timeout, version as well etc.) Your script should do a "snmpget -c <community> .... <hostname/IP> OID" and return solely the value.
Reinhard
lvm wrote:Shingouki,shingouki wrote:just read that its possible to do it via Data Input Methods, just created my simple scripts but was confused on how I can invoke it and then graph the data that was run by the scripts. Would appreciate any enlightment. Many thanks.
there is a documentation on this: http://www.cacti.net/downloads/docs/htm ... PUT_METHOD
In your case, I'd say a single shell script should to the trick. You may provide hostname/IP address, community string and OID to it (perhaps you'll like to provide the SNMP port, timeout, version as well etc.) Your script should do a "snmpget -c <community> .... <hostname/IP> OID" and return solely the value.
Reinhard
yup it worked! just recently make sense to me on how to add it finally. many thanks
What I did are;
1. Create Data Input Method using the scripts
2. Create a Graph Template
3. Add a Data Source
4. then Add the Graph
Cacti Rocks And Rules!!!
Shingouki
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Cacti should. What poller are you using?
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Interesting. I will have to investigate since I believe, repeat "believe", we are stripping off the nva characters. What does your DEBUG log state?
TheWitness
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
TheWitness wrote:Interesting. I will have to investigate since I believe, repeat "believe", we are stripping off the nva characters. What does your DEBUG log state?
TheWitness
my log shows these errors;
08/31/2005 04:50:44 PM - CMDPHP: Poller[0] Host[5] DS[126] WARNING: Result from CMD not valid. Partial Result: "22
...
08/31/2005 04:46:13 PM - CMDPHP: Poller[0] Host[5] DS[126] WARNING: Result from CMD not valid. Partial Result: "28
...
08/31/2005 04:40:40 PM - CMDPHP: Poller[0] Host[5] DS[126] WARNING: Result from CMD not valid. Partial Result: "30
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Please make sure the following exists in your functions.php:
And that you are running 0.8.6f with patches.
TheWitness
Code: Select all
/* strip_quotes - Strip single and double quotes from a string
in addition remove non-numeric data from strings.
@arg $result - (string) the result from the poll
@returns - (string) the string with quotes stripped */
function strip_quotes($result) {
/* first strip all single and double quotes from the string */
$result = strtr($result,"'","");
$result = strtr($result,'"','');
/* clean off ugly non-numeric data */
if ((!is_numeric($result)) && ($result != "U")) {
$len = strlen($result);
for($a=$len-1; $a>=0; $a--){
$p = ord($result[$a]);
if (($p > 47) && ($p < 58)) {
$result = substr($result,0,$a+1);
break;
}
}
}
return($result);
}
TheWitness
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Oh, now know the issue. Change to the following:
Discovered this today while writing code. Nasty changes in PHP behavior.
Code: Select all
/* strip_quotes - Strip single and double quotes from a string
in addition remove non-numeric data from strings.
@arg $result - (string) the result from the poll
@returns - (string) the string with quotes stripped */
function strip_quotes($result) {
/* first strip all single and double quotes from the string */
$result = strtr($result,"'"," ");
$result = strtr($result,'"',' ');
/* clean off ugly non-numeric data */
if ((!is_numeric($result)) && ($result != "U")) {
$len = strlen($result);
for($a=$len-1; $a>=0; $a--){
$p = ord($result[$a]);
if (($p > 47) && ($p < 58)) {
$result = substr($result,0,$a+1);
break;
}
}
}
return(trim($result));
}
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
What version of php does the behavor change in?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
only difference on the code entry under functions.php is below;
from: return($result);
to: return(trim($result));
made the modification but same...
Have tried running patches but looking a specific file to patch. So Im not sure which is which.
..........
sh# pwd
/opt/cacti-0.8.6f
sh# patch -p1 -N < multi_field_output_script_server.patch
Looks like a unified context diff.
File to patch:
No file found -- skip this patch? [no]
File to patch: ^C
sh#
sh# patch -p1 -N < multi_field_output_script_server.patch
Looks like a unified context diff.
File to patch: data_input.php
Hunk #2 failed at line 515.
1 out of 2 hunks failed: saving rejects to data_input.php.rej
I can't seem to find a patch in there anywhere.
sh#
.....................
My system install btw is a Solaris 8(SPARC) with packages version below.
cacti-0.8.6f
httpd-2.0.54
mysql-4.1.14
php-5.0.2
rrdtool-1.0.49
libxml2-2.6.16
Shingouki
from: return($result);
to: return(trim($result));
made the modification but same...
Have tried running patches but looking a specific file to patch. So Im not sure which is which.
..........
sh# pwd
/opt/cacti-0.8.6f
sh# patch -p1 -N < multi_field_output_script_server.patch
Looks like a unified context diff.
File to patch:
No file found -- skip this patch? [no]
File to patch: ^C
sh#
sh# patch -p1 -N < multi_field_output_script_server.patch
Looks like a unified context diff.
File to patch: data_input.php
Hunk #2 failed at line 515.
1 out of 2 hunks failed: saving rejects to data_input.php.rej
I can't seem to find a patch in there anywhere.
sh#
.....................
My system install btw is a Solaris 8(SPARC) with packages version below.
cacti-0.8.6f
httpd-2.0.54
mysql-4.1.14
php-5.0.2
rrdtool-1.0.49
libxml2-2.6.16
Shingouki
Who is online
Users browsing this forum: No registered users and 1 guest