Showing posts with label SNMP. Show all posts
Showing posts with label SNMP. Show all posts

Thursday, November 28, 2013

Recipe: Linux SNMPD script OID & Cacti example ( VSFTD number of users )

Today we have to implement a new chart in our Cacti, this chart has to display the number of users connected to a VSFTPD server in a CentOS server.

VSFTPD CONFIG
Firstly, you have to setup VSFTD to display the number of connections, to do this, you have to add this variable setproctitle_enable=YES in the vsftpd.conf file and restart the service.
This setting allows you to monitor the clients, now you can see the connection in the output of ps command, in this case the output looks like this:
vsftpd_daemon_user 11203  1.0  0.3  56320  1548 ?        Ss   15:12   0:00 vsftpd: 90.IP.IP.IP: connected
Counting the number of connections is very easy, one script like this is enough:
 #!/bin/bash  
 ps aux | grep vsftp | grep connected | wc -l  
It will return the number of the connected users.
We are going to save it as /scripts/ftp-who.sh to use it in the next examples.
Now is time to integrate it on SNMPD config.

Monday, November 25, 2013

SCOM SNMP monitorig

SNMP monitoring is easy to implement in SCOM 2012.
SNMP monitoring in SCOM is an example of agentless monitoring.
Since SCOM 2012 there are a lot of templates related with SNMP devices, before SCOM 2012 you had to install the xSNMP management pack, nowadays a lot of vendors are included in SCOM 2012 by default.

Here is a list of well supported devices: http://www.microsoft.com/en-us/download/confirmation.aspx?id=26831