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

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.
LVL 29
Michael WorshamStaff Infrastructure ArchitectAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nociSoftware EngineerCommented:
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
nociSoftware EngineerCommented:
btw i am using net-snmp:
http://net-snmp.sourceforge.net/
0
Roachy1979Commented:
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
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Jason WatkinsIT Project LeaderCommented:
0
Michael WorshamStaff Infrastructure ArchitectAuthor Commented:
@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
Michael WorshamStaff Infrastructure ArchitectAuthor Commented:
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
Michael WorshamStaff Infrastructure ArchitectAuthor Commented:
@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
nociSoftware EngineerCommented:
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
Michael WorshamStaff Infrastructure ArchitectAuthor Commented:
@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
nociSoftware EngineerCommented:
there are multiple SNMP stacks which is the one you are using?
Can you give it's config?
0
Michael WorshamStaff Infrastructure ArchitectAuthor Commented:
@noci: Here is a copy of the snmpd.conf file as requested.
snmpd.txt
0
Michael WorshamStaff Infrastructure ArchitectAuthor Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nociSoftware EngineerCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.