Very Very Nice. Did not take long to get setup. I have been using cricket for the last year.
Would like to be able to pull data from a snmpagent not running on port 161 (say port 1161, etc..).
It is easy to add to the perl scripts, but what about the built in Internal data gathers.
Thanks
Feature Request: snmp port
Moderators: Developers, Moderators
If you don't mind editing a few lines of code, here is how to change the SNMP port number for the builtin SNMP functions.
On line 415 of 'include/snmp_functions.php' change the following line:
$snmp_output_octets = snmpget($snmp_ip, $snmp_community, "$snmp_octet_name.$snmp_interface_number");
to:
$snmp_output_octets = snmpget($snmp_ip . ":PORT#", $snmp_community, "$snmp_octet_name.$snmp_interface_number");
Then, change line 438 from:
$snmp_output_octets = snmpget($snmp_ip, $snmp_community, $snmp_oid);
to:
$snmp_output_octets = snmpget($snmp_ip . ":PORT#", $snmp_community, $snmp_oid);
Hope this helps.
-Ian
On line 415 of 'include/snmp_functions.php' change the following line:
$snmp_output_octets = snmpget($snmp_ip, $snmp_community, "$snmp_octet_name.$snmp_interface_number");
to:
$snmp_output_octets = snmpget($snmp_ip . ":PORT#", $snmp_community, "$snmp_octet_name.$snmp_interface_number");
Then, change line 438 from:
$snmp_output_octets = snmpget($snmp_ip, $snmp_community, $snmp_oid);
to:
$snmp_output_octets = snmpget($snmp_ip . ":PORT#", $snmp_community, $snmp_oid);
Hope this helps.
-Ian
I think the easiest way is changing in 'cacti Settings'
from: /usr/bin/snmpget
to: /usr/bin/snmpget -p1161
I often change the 'retries' and 'timeout' parameters there: /usr/bin/snmpget -r2 -t5
Ie: 2 retries with 5 seconds for timeout
On Linux type 'man snmpcmd' for more options on snmp commands.
-Gilson
from: /usr/bin/snmpget
to: /usr/bin/snmpget -p1161
I often change the 'retries' and 'timeout' parameters there: /usr/bin/snmpget -r2 -t5
Ie: 2 retries with 5 seconds for timeout
On Linux type 'man snmpcmd' for more options on snmp commands.
-Gilson
The port may vary from machine to machine (want data from net-snmp, but on E10k need to keep Sun snmp running). So on some machine the data will be on port 161 and other 1161. So I dont want to hard code the port.
Was hoping to have the port number prompted from the setup page for that machine or data collection page. I have made changes to include/snmp_functions.php to do this. Need to find and make changes to code that generates the web form for data input.
Was hoping to have the port number prompted from the setup page for that machine or data collection page. I have made changes to include/snmp_functions.php to do this. Need to find and make changes to code that generates the web form for data input.
Who is online
Users browsing this forum: No registered users and 2 guests