?
Solved

Is there a way under snmpd.conf to probe server based on variables?

Posted on 2010-03-24
13
Medium Priority
?
441 Views
Last Modified: 2013-12-15
I have a number of RHEL5 servers located in a private cloud environment. Is it possible to enable SNMP on these servers then allow the server to be checked by a 3rd party application (i.e. Spiceworks) and give a result to what the current OS version and kernel is running, known open ports available, etc? If someone has an example snmpd.conf file with what I am trying to do that would be great.
0
Comment
Question by:Michael Worsham
13 Comments
 
LVL 41

Expert Comment

by:noci
ID: 28524050
Just for fun, have you tried:
snmpwalk -c community_name system_to_check

In my system system.sysDescr has the actual kernel description
there is a process list (HOST-RESOURCES-MIB)
a list of listening ports (TCP-MIB & UDP-MIB)
etc.

sysDescr is NOT mentioned in snmp logfiles.
Please ask more specific if you need something else...
0
 
LVL 41

Expert Comment

by:noci
ID: 28525140
btw i am using net-snmp:
http://net-snmp.sourceforge.net/
0
 
LVL 14

Expert Comment

by:Roachy1979
ID: 28529783
If you're not tied to Spiceworks I'd consider Nagios for more extensive functionality.  

There's a Nagios plugin to check distro and Kernel version on the Nagios Exchange

http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_version/details

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 27

Expert Comment

by:Jason Watkins
ID: 28557577
0
 
LVL 29

Author Comment

by:Michael Worsham
ID: 28595363
@Noci: I tried the snmpwalk command  (nmpwalk -Os -c public -v 1 localhost system), but it showing things like process list and open ports isn't coming through... unless there is something else I need to have in the snmpd.conf file to reflect such actions.



sysDescr.0 = STRING: Linux servername.domain.local 2.6.18-164.11.1.el5 #1 SMP Wed Jan 6 13:26:04 EST 2010 x86_64
sysObjectID.0 = OID: netSnmpAgentOIDs.10
sysUpTimeInstance = Timeticks: (9495391) 1 day, 2:22:33.91
sysContact.0 = STRING: Root <myaccount@xxxxxx.xxx>
sysName.0 = STRING: servername.domain.local
sysLocation.0 = STRING: Terremark
sysORLastChange.0 = Timeticks: (3) 0:00:00.03
sysORID.1 = OID: snmpMIB
sysORID.2 = OID: tcpMIB
sysORID.3 = OID: ip
sysORID.4 = OID: udpMIB
sysORID.5 = OID: vacmBasicGroup
sysORID.6 = OID: snmpFrameworkMIBCompliance
sysORID.7 = OID: snmpMPDCompliance
sysORID.8 = OID: usmMIBCompliance
sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
sysORDescr.2 = STRING: The MIB module for managing TCP implementations
sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations
sysORDescr.4 = STRING: The MIB module for managing UDP implementations
sysORDescr.5 = STRING: View-based Access Control Model for SNMP.
sysORDescr.6 = STRING: The SNMP Management Architecture MIB.
sysORDescr.7 = STRING: The MIB for Message Processing and Dispatching.
sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model.
sysORUpTime.1 = Timeticks: (1) 0:00:00.01
sysORUpTime.2 = Timeticks: (1) 0:00:00.01
sysORUpTime.3 = Timeticks: (1) 0:00:00.01
sysORUpTime.4 = Timeticks: (1) 0:00:00.01
sysORUpTime.5 = Timeticks: (1) 0:00:00.01
sysORUpTime.6 = Timeticks: (3) 0:00:00.03
sysORUpTime.7 = Timeticks: (3) 0:00:00.03
sysORUpTime.8 = Timeticks: (3) 0:00:00.03

Open in new window

0
 
LVL 29

Author Comment

by:Michael Worsham
ID: 28595570
Just to make everyone clear on this, I have to only use what is found in the RHEL/RHN repository. I cannot use external repo or software sites (i.e. EPEL, RPMForge, SourceForge, etc) as this is a government secure server environment. Only RHN is considered FIPS 140-2 compliant.
0
 
LVL 29

Author Comment

by:Michael Worsham
ID: 28596453
@Roachy1979: Nagios was my other idea on being used, however since Nagios is not found in the RHN repository, then I am at a loss.
0
 
LVL 41

Expert Comment

by:noci
ID: 28605020
You only requested info from system, have tried the whole tree?

like:
snmpwalk -Os -c public -v 1 localhost
or:
snmpwalk -c public -v 1 localhost

or more specific: f.e.:
snmpwalk -c public -v 1 localhost TCP
snmpwalk -c public -v 1 localhost UDP
snmpwalk -c public -v 1 localhost HOST


0
 
LVL 29

Author Comment

by:Michael Worsham
ID: 28627852
@noci: Tried the commands and the only one that returned anything is the "snmpwalk -c public -v 1 localhost" & "snmpwalk -c public -v 1 localhost HOST". The TCP and UDP ones don't return anything.

I tried it as this one too: "snmpwalk -c public -v 2c localhost TCP" and I get a reponse like "TCP-MIB::tcp = No Such Object available on this agent at this OID"
0
 
LVL 41

Expert Comment

by:noci
ID: 28661707
there are multiple SNMP stacks which is the one you are using?
Can you give it's config?
0
 
LVL 29

Author Comment

by:Michael Worsham
ID: 28676174
@noci: Here is a copy of the snmpd.conf file as requested.
snmpd.txt
0
 
LVL 29

Accepted Solution

by:
Michael Worsham earned 0 total points
ID: 30632264
I found the best way was to just develop my own auditing script from the ground up. Our documentation librarian approved it as it providers all of the information that was needed for covering both FIPS and NIST requirements. I am attaching a copy of it here if anyone wants to use it for their RHEL, Fedora or CentOS server environment.


rhel-audit.txt
0
 
LVL 41

Expert Comment

by:noci
ID: 30657891
OK, glad it is solved.

there is not a lot of difference between what I have and your snmpd.conf.
I use gentoo so appearantly there is a small difference of choises during setup.
I didn't have time yet to delve deeper into the question.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question