libs-ec/README.SNMP
Richard Frith-MacDonald 442f5e8640 Add more error handling and improve installation instructions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@38593 72102866-910b-0410-8b05-ffd578937521
2015-05-31 09:41:11 +00:00

104 lines
3.9 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 and/or ~/.snmp/mibs
depending on whether this is a system-wide installation or one for a
single user/account.
2. For diagnosing problems in snmpd,
edit '/etc/sysconfig/snmpd' to contain:
OPTIONS="-Dgnustep -Lf /var/log/snmpd"
so that any debug for the gnustep MIB would be logged
in /var/log/snmpd
or use '-Dgnustep -LS0-6d' for logging via syslog.
3. For diagnosign problems in snmptrapd,
edit '/etc/sysconfig/snmptrapd' to contain:
OPTIONS="-Dgnustep -Lf /var/log/snmptrapd"
so that any debug for the gnustep MIB would be logged
in /var/log/snmptrapd
or use '-Dgnustep -LS0-6d' for logging via syslog.
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).
NB. Your system may be configured to disallow access via 'public', in
which case the line
rwcommunity public
will not be sufficient to grant access to the alarm tables and you will
need to either configure appropriate snmp access control settings for
your system, or completely replace the file (but that would give
unrestricted access, and therefore be a security problem ... so you
should only do it for temporary testing of an isolated system).
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. For diagnostics and control of the net-snmp copmponent, you can use a
gnustep.conf file in any of the standard locations read by netsnmp.
Typically ~/.snmp/gnustep.conf (where ~ is the home directory of the
account running the Control server).
The contents of the file to enable debug logging would typically be
[snmp]
doDebugging 1
debugTokens gnustep
7. build/install/run the Control server
8. 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