mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-19 10:01:24 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@35811 72102866-910b-0410-8b05-ffd578937521
76 lines
2.8 KiB
Text
76 lines
2.8 KiB
Text
|
|
Here's the sort of thing you might do to set up SNMP support on your
|
|
system, assuming that you have net-snmp installed in the normal
|
|
locations for something like RedHat Linux.
|
|
|
|
0. Edit the example GNUSTEP-MIB.txt to contain your own organisation's
|
|
Private Enterprise Number. This stage is optional, you may use the
|
|
MIB 'as-is' with the GNUstep PEN if you wish. You only need to use
|
|
an edited version if your organisation wishes to use its own MIB
|
|
with additional features not in the GNUstep one.
|
|
If you are using your own MIB, replace all ocurrances below of
|
|
GNUSTEP-MIB.txt with the name of your own MIB file.
|
|
|
|
1. install GNUSTEP-MIB.txt in /usr/share/snmp/mibs
|
|
|
|
2. edit '/etc/sysconfig/snmpd.options' to contain:
|
|
OPTIONS="$OPTIONS -Dgnustep -Lf /var/log/snmpd"
|
|
export OPTIONS
|
|
so that any debug for the gnustep module would be logged
|
|
in /var/log/snmpd
|
|
|
|
3. edit '/etc/sysconfig/snmptrapd.options' to contain:
|
|
OPTIONS="$OPTIONS -Dgnustep -Lf /var/log/snmptrapd"
|
|
export OPTIONS
|
|
so that any debug for the gnustep module would be logged
|
|
in /var/log/snmptrapd
|
|
|
|
4. edit /etc/snmp/snmpd.conf to get it to send traps to snmptrapd ...
|
|
|
|
rwcommunity public
|
|
trap2sink localhost public
|
|
|
|
and to accept agentx connections via tcp ...
|
|
|
|
agentxsocket tcp:localhost:705
|
|
master agentx
|
|
|
|
having the snmp daemon listening on port 705 for agentx connections is
|
|
essential for the default setup of alarming, but you can use a different
|
|
host and port if you wish (see the EcAlarmSinkSNMP initialisation for
|
|
details).
|
|
|
|
5. restart with '/sbin/service snmpd restart'
|
|
If you are starting snmp for the first time on a RedHat system then:
|
|
# /sbin/chkconfig snmpd on
|
|
# /sbin/service snmpd start
|
|
should enable the snmp service and then start it.
|
|
|
|
6. build/install/run the Control server
|
|
|
|
7. test with snmpwalk ...
|
|
|
|
To look at EVERYTHING:
|
|
snmpwalk -v 1 -c public localhost GNUSTEP-MIB::gnustep
|
|
|
|
To look at the current alarms table:
|
|
snmpwalk -v 1 -c public localhost GNUSTEP-MIB::gnustep.alarms.alarmsTable
|
|
|
|
To look at the current alarms table in a tabular format (rows of columns) which will be far too wide to view in a normal terminal window:
|
|
snmptable -v 1 -c public localhost GNUSTEP-MIB::gnustep.alarms.alarmsTable
|
|
|
|
To look at the managed objects table:
|
|
snmpwalk -v 1 -c public localhost GNUSTEP-MIB::gnustep.objects
|
|
|
|
You should be able to get the heartbeat poll interval with:
|
|
snmpget -v 1 -c public localhost GNUSTEP-MIB::pollHeartBeat.0
|
|
|
|
You should be able to set the heartbeat poll interval to two minutes with
|
|
snmpset -v 1 -c public localhost GNUSTEP-MIB::pollHeartBeat.0 i 2
|
|
|
|
You should be able to set the resync flag interval with
|
|
snmpset -v 1 -c public localhost GNUSTEP-MIB::resyncFlag.0 i 1
|
|
and set it back to normal with
|
|
snmpset -v 1 -c public localhost GNUSTEP-MIB::resyncFlag.0 i 0
|
|
|
|
|