So can anyone help me to configure below 3 points on client side where we have SNMP Service installed?
Litle bit of background:
We have one OpenNMS Monitoring server, which monitors all other servers in our organization. since last few days we have a requirement to monitor below points on all ubuntu servers. (As all linux servers are ubuntu in our organization.)
1. History of all the commands used or tried (history of every users cli) by any user with basic information. (Like username, complete command, date and time command was used,whether it was successful or not, etc.)
2. List of users who have not logged in to the server since last 10 days.
3. list of users who's passwords are locked out or auth keys are expired.
Now OpenNMS monitors all servers using snmp & snmp traps.
Please feel free to ask in case any further information is required. Thanks in advance.
Some additional information about OpenNMS Server we have:
OpenNMS Web Console
Version: 1.10.10
Server Time: Tue Aug 06 13:14:21 IST 2013
Client Time: Tue Aug 06 2013 13:12:57 GMT+0530 (India Standard Time)
Java Version: 1.6.0_27 Sun Microsystems Inc.
Java Virtual Machine: 20.0-b12 Sun Microsystems Inc.
Operating System: Linux 3.5.0-23-generic (amd64)
Servlet Container: jetty/7.5.1.v20110908 (Servlet Spec 2.5)
User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
Database Type: PostgreSQL
Database Version: 9.1.9
You're going to have to write a custom program that gathers all that information first. Then I'd suggest you use an SNMP library linked to that program that will then send the data structs via SNMP traps.
An example would be to install the Net-SNMP libraries, write a Perl script that gathers all the data you want and then use the Net-SNMP Perl module in that script to send the SNMP traps with the data.
I think sending an SNMP trap with a user's cli history is a really bad idea. SNMP traps are usually plain text and insecure.