User Tools

Site Tools


simple_snmp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
simple_snmp [2007/08/29 00:09]
adam
simple_snmp [2016/11/25 22:38] (current)
Line 11: Line 11:
 Most networking devices such as routers (even home consumer routers) and managed switches offer SNMP support. The most common usage of SNMP is in querying for system status information as described above, but it is also possible to write values to a system using SNMP and using certain types of system events as what are called SNMP traps, which are sent to a monitoring system which will generate alerts for the system administrators. Neither SNMP writes or SNMP traps are discussed here. Perhaps they will be in an update at some point. Most networking devices such as routers (even home consumer routers) and managed switches offer SNMP support. The most common usage of SNMP is in querying for system status information as described above, but it is also possible to write values to a system using SNMP and using certain types of system events as what are called SNMP traps, which are sent to a monitoring system which will generate alerts for the system administrators. Neither SNMP writes or SNMP traps are discussed here. Perhaps they will be in an update at some point.
  
-Information is stored in a tree like structure as far as SNMP is concerned. MIBs (Management Information Bases) are essentially like branches on the tree, they are groups of related SNMP data, such as system data, interface data. OIDs (object identifiers) are leaves on the tree, that is, they are individual items of queryable data. Phew. Technical. OIDs are normally numeric values, but thankfully most have human memorable names. MIBs are stored as text files under /usr/share/snmp/mibs/ in Linux.+Information is stored in a tree like structure as far as SNMP is concerned. MIBs (Management Information Bases) are essentially like branches on the tree, they are groups of related SNMP data, such as system data, interface data etc. OIDs (object identifiers) are leaves on the tree, that is, they are individual items of queryable data, as defined in the MIBs. Phew. Technical. OIDs are normally numeric values, but thankfully most have human memorable names. MIBs are stored as text files under /usr/share/snmp/mibs/ in Linux.
  
 Many network hardware vendors provide MIBs which map their specific hardware information (temperatures, fans speeds etc, power usage) to a set of OIDs, normally under the 'enterprises' MIB group. The default set of MIBs on Linux is pretty good, so you only need these extra MIBs for system data unique to the hardware you are using. Cisco MIBs will certainly be useful when using their equipment. You should first try your hardware vendor or there are many places to get get MIBs if you need them. I haven't yet found a clean, easy way to include vendor specific MIBs when querying, but you should start by placing them under /usr/share/snmp/mibs/. Many network hardware vendors provide MIBs which map their specific hardware information (temperatures, fans speeds etc, power usage) to a set of OIDs, normally under the 'enterprises' MIB group. The default set of MIBs on Linux is pretty good, so you only need these extra MIBs for system data unique to the hardware you are using. Cisco MIBs will certainly be useful when using their equipment. You should first try your hardware vendor or there are many places to get get MIBs if you need them. I haven't yet found a clean, easy way to include vendor specific MIBs when querying, but you should start by placing them under /usr/share/snmp/mibs/.
Line 167: Line 167:
 This will make MRTG collect stats via SNMP every 5 minutes. Do the same for any other hosts you wish to graph. Note that I have redirected all standard output and errors to /dev/null, so I don't have to hear about it if it doesn't work. Don't do this until you are satisfied that it works properly. This will make MRTG collect stats via SNMP every 5 minutes. Do the same for any other hosts you wish to graph. Note that I have redirected all standard output and errors to /dev/null, so I don't have to hear about it if it doesn't work. Don't do this until you are satisfied that it works properly.
  
-And that, my friend, is it. You should try graphing CPU, disk and memory usage, system load, component temperatures and so on. MRTG is able to graph anything which you pass it information for and SNMP can make most of that information available over a network.+And that, my friend, is it. 
 + 
 +==== Going Further ==== 
 + 
 +You should try graphing other data such as CPU, disk and memory usage, system load, component temperatures and so on. MRTG is able to graph anything which you pass it information for and SNMP can make most of that information available over a network. Cacti is an alternative to MRTG for graphing other variables and is probably far easier. Investigate SNMP v3 for a more secure implementation. For lower CPU load, try replacing the default graphing tool in MRTG with RRDTool which was written by the same guy as MRTG.
  
 TODO: TODO:
  
 Links Links
simple_snmp.1188342576.txt.gz · Last modified: 2016/11/25 22:38 (external edit)