An WARNING: Result from SNMP not valid. Partial Result:U in Cacti logs
php_snmp module return ifOperStatus like this:
Up(1)
Down(2)
so you must modify lib/snmp.php
1.PHP Load
Enable php_snmp module
2.Source Modify
resource/snmp_queries/interface.xml
add
Code: Select all
<ifOperStatusOut>
<name>Status</name>
<method>walk</method>
<source>VALUE/REGEXP:[a-zA-Z]{1,}\(([1-9]{1})+\)$</source>
<direction>output</direction>
<oid>.1.3.6.1.2.1.2.2.1.8</oid>
</ifOperStatusOut>
line
Code: Select all
define("REGEXP_SNMP_TRIM".....
Code: Select all
define("REGEXP_SNMP_TRIM", "(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|([a-zA-Z]{1,}\()|\)$");
cacti_data_query_snmp_-_interface_statistics_done.xml
cacti_data_template_interface_-_link_status_done.xml
cacti_graph_template_interface_-_link_status_done.xml
5.CDEF Setting
Add an CDEF Named Link Display
Item #1 Special Data Source: CURRENT_DATA_SOURCE
Item #2 Custom String: 0,IF,CEIL
Link Display
Link Dormant
Link Down
Link Lower Layer Down
Link Not Present
Link Testing
Link Unkown
Link Up
Item #3 Another CDEF: Link Display