Skip to content

Commit dbf0bda

Browse files
authored
update SIMP README documentation (#121)
1 parent 18645cc commit dbf0bda

File tree

1 file changed

+75
-46
lines changed

1 file changed

+75
-46
lines changed

README.md

Lines changed: 75 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,112 @@
1-
# Simp
1+
# SIMP
22

3-
A small system for gathering large amounts of snmp data. The pacakge contains both a collector and a data service interface. A multi-process collector gathers SNMP data from a set of hosts and put that data into a local Redis database. A set of data services then provides access to this data via RabbitMQ. Currently this code is PoC without proper init scripts etc, so the following is a bit... rustic.
3+
SIMP is a small system for gathering large amounts of snmp data.
4+
5+
The pacakge contains both a collector and a data service interface.
6+
A multi-process collector gathers SNMP data from a set of hosts and puts that data into a redis database.
7+
A set of data services then provides access to this data via RabbitMQ.
48

59
## Running The Collector
610

11+
You will need a redis and rabbit server, accesible to the SIMP daemons.
12+
713
For now, you should have redis and rabbitmq installed locally and running.
814

9-
```sh
10-
./simp.pl --config /home/ebalas/config.xml --logging ../logging.conf
15+
```bash
16+
simp-poller.pl --config /etc/simp/poller/config.xml --logging /etc/simp/poller/logging.conf --user simp --group simp
1117
```
1218

13-
The config file controls collection interval, and the number of workers to use and what to collect.
19+
The config files controls collection interval, and the number of workers to use and what to collect.
1420

1521
```xml
16-
<!--
17-
config.xml defines the config for the simp collector, with the individual hosts defined in hosts.conf
18-
-->
22+
<?xml version="1.0" encoding="UTF-8" ?>
1923

24+
<!-- Simp-Poller Main Configuration -->
2025
<config>
21-
<! -- redis: defines how to connect to redis, which is used for data storage -->
22-
<redis host="127.0.0.1" port="6379"/>
23-
24-
<group name="int" active="1" workers="2" interval="60" retention="6">
25-
<!-- mib: specifies the data to gather using getTree
26-
oid: is set to an oid substing expressed as dotted decimal
27-
-->
28-
<mib oid="1.3.6.1.2.1.2.2"/>
29-
<mib oid="1.3.6.1.2.1.31.1.1.1"/>
30-
</group>
26+
<!-- Redis host connection information -->
27+
<redis ip="127.0.0.1" port="6379" reconnect="60" reconnect_every="500" read_timeout="2" write_timeout="3" />
3128

32-
<group name="bgp" active="0" workers="2" interval="30" retention="2">
33-
<mib oid="1.3.6.1.2.1.15"/>
34-
</group>
29+
<!-- How long to keep data in Redis before purging (seconds) -->
30+
<purge interval="3600" />
3531

36-
<group name="mac2ip" active="0" workers="5" interval="60" retention="2"
37-
<mib oid="1.3.6.1.2.1.17.4.3"/>
38-
</group>
32+
<!-- Default num of results to get per SNMP request -->
33+
<request_size results="15" />
3934

35+
<!-- Where to write status files -->
36+
<status dir="/var/lib/simp/poller/" />
4037
</config>
4138
```
4239

43-
The host.conf file contains the set of hosts to collect from and defines the collection group assignments
40+
You will need at least one group definition in /etc/simp/poller/groups.d.
41+
Here is an example all_interfaces.xml group.
42+
43+
```xml
44+
<?xml version="1.0" encoding="UTF-8" ?>
45+
46+
<group workers="1" interval="60" timeout="15">
47+
<mib oid="1.3.6.1.2.1.31.1.1.1.6" /> <!-- inHCbytes -->
48+
<mib oid="1.3.6.1.2.1.31.1.1.1.10" /> <!-- outHCbytes -->
49+
<mib oid="1.3.6.1.2.1.2.2.1.14" /> <!-- inerror -->
50+
<mib oid="1.3.6.1.2.1.2.2.1.20" /> <!-- outerror -->
51+
<mib oid="1.3.6.1.2.1.2.2.1.11" /> <!-- inUcast -->
52+
<mib oid="1.3.6.1.2.1.2.2.1.17" /> <!-- outUcast -->
53+
<mib oid="1.3.6.1.2.1.2.2.1.13" /> <!-- indiscard -->
54+
<mib oid="1.3.6.1.2.1.2.2.1.19" /> <!-- outdiscard -->
55+
<mib oid="1.3.6.1.2.1.2.2.1.7" /> <!-- ifAdminStatus -->
56+
<mib oid="1.3.6.1.2.1.2.2.1.8" /> <!-- ifOperStatus -->
57+
<mib oid="1.3.6.1.2.1.31.1.1.1.1" /> <!-- ifName -->
58+
<mib oid="1.3.6.1.2.1.31.1.1.1.18" /> <!-- ifAlias -->
59+
</group>
60+
```
61+
62+
And you need a file in /etc/simp/poller/hosts.d to define the device collections.
63+
The group id must match the file name in /etc/simp/poller/groups.d.
4464

4565
```xml
66+
<?xml version="1.0" encoding="UTF-8"?>
67+
4668
<config>
47-
<host ip="10.13.1.2" community="come on">
48-
<group id="int"/>
49-
<group id="bgp"/>
50-
</host>
51-
<host ip="10.13.1.1" community="farva man">
52-
<group id="int"/>
53-
<group id="bgp"/>
54-
</host>
55-
<host ip="10.13.2.2" community="same">
56-
<group id="int"/>
57-
</host>
58-
<host ip="10.13.2.1" community="team">
59-
<group id="mac2ip"/>
60-
</host>
61-
</group>
69+
<!-- Connecticut Education 24x7-mem nodes -->
70+
<host name="switch2.example.host" ip="1.1.1.1" community="its_a_secret_to_everyone" snmp_version="2c">
71+
<group id="all_interfaces" />
72+
</host>
6273
</config>
6374
```
6475

6576
## Running the Data Service
6677

67-
```sh
68-
./simpData.pl --config ../simpDataConfig.xml --logging ../logging.conf
78+
```bash
79+
/usr/bin/simp-data.pl --config /etc/simp/data/config.xml --logging /etc/simp/data/logging.conf --user simp --group simp
6980
```
7081

7182
The config is similar to that used by the poller with less details required.
7283

7384
```xml
74-
<config workers="3" >
75-
<redis host="127.0.0.1" port="6379"/>
76-
<rabbitMQ host="127.0.0.1" port="5672"/>
85+
<?xml version="1.0" encoding="UTF-8" ?>
86+
87+
<!-- Simp-Data Main Config -->
88+
<config workers="4">
89+
<redis ip="127.0.0.1" port="6379" reconnect="60" reconnect_every="500" read_timeout="2" write_timeout="3" />
90+
<rabbitmq ip="127.0.0.1" port="5672" user="guest" password="guest" />
91+
</config>
92+
```
93+
94+
## Running the composite service
95+
96+
```bash
97+
/usr/bin/simp-comp.pl --config /etc/simp/comp/config.xml --logging /etc/simp/comp/logging.conf --user simp --group simp
98+
```
99+
100+
Config example:
101+
102+
```xml
103+
<?xml version="1.0" encoding="UTF-8" ?>
104+
105+
<config workers="4">
106+
<rabbitmq ip="127.0.0.1" port="5672" user="guest" password="guest" />
77107
</config>
78108
```
79109

80110
## Testing
81111

82112
#### Testing information can be found [here](https://github.com/GlobalNOC/simp/tree/master/t)
83-

0 commit comments

Comments
 (0)