Skip to content

Commit 4641e49

Browse files
authored
snmp custom data, fix few typos (#190)
* small update * first version * add custom data * update tcp ping closed
1 parent 3476ac2 commit 4641e49

5 files changed

+67
-10
lines changed

Devices.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ They include:
5757
- **SNMP Uptime** - Query the SNMP Uptime Instance OID
5858
- **Ping and SNMP Uptime** - Ping the device but also check the SNMP Uptime
5959
Instance OID
60-
- **Ping** - Either ICMP, TCP at a port, or UDP as a port
60+
- **Ping** - Either ICMP, TCP at a port, or UDP as a port. Newer version has an aditional method TCP Ping Closed.
61+
The device is considered UP even if the tcp ping returns closed
6162
- **Ping or SNMP Uptime** - Only one needs to be working for Cacti to collect data
6263
- **SNMP Desc** - Query the SNMP sysDescription in cases where the SNMP Uptime OID
6364
is not available

How-To-SNMP-Custom-Script.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# How To Extend snmpd with custom script/data
2+
3+
Some SNMP servers can be extended with custom scripts or programs. The output of the running script can then
4+
be read using the OID and can therefore be easily used in Cacti. An example is the thermometer on the USB port.
5+
In combination with [Graph a Single SNMP OID](Graph-a-Single-SNMP-OID.md), this is a very simple way to display such data
6+
7+
We will show the procedure for the very extensive Net-SNMP and FreeBSD BSNMPD.
8+
9+
## Linux Net-SNMP
10+
Simply add a line to /etc/snmpd.conf and restart snmpd
11+
**> extend test /bin/echo hello**
12+
13+
Result will be here:
14+
**> snmpwalk -v2c -c testing 127.0.0.1 nsExtendOutput1**
15+
``
16+
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."test" = STRING: hello
17+
NET-SNMP-EXTEND-MIB::nsExtendOutputFull."test" = STRING: hello
18+
NET-SNMP-EXTEND-MIB::nsExtendOutNumLines."test" = INTEGER: 1
19+
NET-SNMP-EXTEND-MIB::nsExtendResult."test" = INTEGER: 0``
20+
21+
For Cacti you need numeric OID, you can use snmptranslate:
22+
**> snmptranslate -On NET-SNMP-EXTEND-MIB::nsExtendOutput1Line.\"test\"**
23+
24+
The result is an OID that we can use:
25+
``.1.3.6.1.4.1.8072.1.3.2.3.1.1.4.116.101.115.116``
26+
27+
28+
## FreeBSD BNSMPD
29+
You need install bsnmp-ucd
30+
**> pkg install bsnmp-ucd**
31+
32+
Add these lines to /etc/snmpd.config and restart bsnmpd
33+
begemotSnmpdModulePath."ucd" = "/usr/local/lib/snmp_ucd.so"
34+
%ucd
35+
extNames.0 = "first command"
36+
extCommand.0 = "/path/to/script.sh"
37+
extNames.1 = "second command"
38+
extCommand.1 = "/path/to/script.sh param1"
39+
40+
Name and result of first command have the same intex:
41+
**> snmpwalk -v2c -c testing 127.0.0.1 .1.3.6.1.4.1.2021.8.1.2.0**
42+
``.1.3.6.1.4.1.2021.8.1.2.0 = STRING: first command``
43+
44+
**> snmpwalk -v2c -c testing 127.0.0.1 .1.3.6.1.4.1.2021.8.1.101.0**
45+
``.1.3.6.1.4.1.2021.8.1.101.0 = STRING: 15``
46+

How-To-Setup-Remote-Pollers.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22

33
Remote Pollers add complexity to your cacti setup while also massively extended
44
the scalability of it. Remote Pollers allow system admins to distribute
5-
the load of polling between different servers as well as provideanother source
6-
of polling close to a device
5+
the load of polling between different servers as well as provide another source
6+
of polling close to a device.
77

8-
For example you may have a device in toronto but if your pollers are in Newyork
8+
For example you may have a device in Toronto but if your pollers are in New York
99
the network latency may causes issues with your metrics having a remote poller
10-
in Toronto in this case will help with that issue
10+
in Toronto in this case will help with that issue.
1111

1212
## Setup Instructions
1313

14+
The process of remote poller installation is similar to cacti installation.
15+
In the wizard, select the installation type for Remote poller. For the remote poller
16+
you must use the same version of cacti as the main poller installation.
17+
1418
With this setup the following layout is assumed
1519

1620
- Main server IP is 192.168.1.5

Plugins.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Plugin Management
22

3+
Installing or updating plugins on cacti is a simple procedure.
4+
For most of the plugins a few basic steps are enough, which are described below.
5+
Each plugin directory should contain a README.md file. We recommend to study
6+
this file. It may contain important installation information.
7+
38
## Installing Plugins
49

510
![plugins](images/plugins.png)
611

7-
Installing plugins on cacti is a simple procedure
812

913
1. Download the plugin to cactidir/cacti/plugins
1014

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,15 @@ PARTICULAR PURPOSE. See the GNU General Public License for more details.
334334

335335
9. [How To Setup SSH Tunnels](How-To-SSH-Tunnels.md)
336336

337-
10.[Enable SSL for Cacti](Cacti-SSL-Configuration.md)
337+
10. [Enable SSL for Cacti](Cacti-SSL-Configuration.md)
338338

339-
11.[Graph a Single SNMP OID](Graph-a-Single-SNMP-OID.md)
339+
11. [Graph a Single SNMP OID](Graph-a-Single-SNMP-OID.md)
340340

341-
12.[Change poller interval from 5 minutes to 1 minute ](How-To-Poller-5-to-1-min.md)
341+
12. [How To Extend snmpd with custom script/data](How-To-SNMP-Custom-Script.md)
342342

343-
13.[Convert from Package based install to source on Ubuntu/Debian](convert-from-package-to-source-debian-ubuntu.md)
343+
13. [Change poller interval from 5 minutes to 1 minute ](How-To-Poller-5-to-1-min.md)
344+
345+
14. [Convert from Package based install to source on Ubuntu/Debian](convert-from-package-to-source-debian-ubuntu.md)
344346

345347
### Video Tutorials
346348

0 commit comments

Comments
 (0)