Monit logs to syslog or to its own log file and notifies you about error conditions via customisable alert messages. Monit is controlled via an easy to configure control file based on a free-format, token-oriented syntax. You can use Monit to monitor files, directories and filesystems for changes, such as timestamps changes, checksum changes or size changes. Monit can start a process if it does not run, restart a process if it does not respond and stop a process if it uses too much resources. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations. Monit is a utility for managing and monitoring processes, programs, files, directories and filesystems on a Unix system. Monit - utility for monitoring services on a Unix system SYNOPSIS SYSTEM AND PER-PROCESS FILEDESCRIPTORS TEST.Write: bytes per second (physical storage).Read: bytes per second (physical storage).Setting a mail server for alert delivery.You can include those graphs into your own website, or add a new /var/www/html/index. Now just add a crontab entry that would update the graphs every 5 minutes, and start ApacheĮcho "*/5 * * * * bash /root/rrdupdate.sh" > /var/spool/cron/root Run your script to make sure there are no errors and that graphs are generated: 'DEF:out=/root/emailocean.tk.rrd:out:AVERAGE' \ 'DEF:in=/root/emailocean.tk.rrd:in:AVERAGE' \ Rrdupdate /root/emailocean.tk.rrd N:`snmpget -v 1 -c DigitalOcean -Oqv 198.211.112.99 \ 'GPRINT:kbout:AVERAGE:Average Bandwidth Out\:%3.2lf KBps\j' 'GPRINT:kbin:AVERAGE:Average Bandwidth In\: %3.2lf KBps' \ 'GPRINT:kbout:LAST:Last Bandwidth Out\: %3.2lf KBps\j' \ 'GPRINT:kbin:LAST:Last Bandwidth In\: %3.2lf KBps' \ 'DEF:out=/root/cloudmail.tk.rrd:out:AVERAGE' \ 'DEF:in=/root/cloudmail.tk.rrd:in:AVERAGE' \ Rrdupdate /root/cloudmail.tk.rrd N:`snmpget -v 1 -c DigitalOcean -Oqv 198.211.107.218 \ Save this file as /root/rrdupdate.sh and make sure you do not have any spaces after '\' since this is all a single line that was broken into multiple: The first set of commands creates and updates the data file, while second one plots this data into a PNG file that will be saved into Apache's DocumentRoot path. Rrdtool create /root/emailocean.tk.rrd -s 60 DS:in:COUNTER:300:U:U DS:out:COUNTER:300:U:U RRA:AVERAGE:0.5:1:10080Ĭreate a script that would update your graphs. Yum -y install net-snmp-utils rrdtool httpd & chkconfig httpd onĬreate RRD database files for each client. Now you can start SNMP daemon on all of your servers that you wish to monitor: Iptables -A INPUT -s 0/0 -p udp -dport 161 -j DROP If you have firewall rules on your servers, make sure to allow UDP connections to port 161 from your monitoring droplet, and drop everyone else: Yum -y install net-snmp & chkconfig snmpd on & :> /etc/snmp/nfĪdd the following lines to /etc/snmp/nf:Ĭom2sec mynetwork 198.211.117.251 DigitalOceanĪccess MyROGroup "" any noauth exact all none none Step 2 - Install Packages on Hosts to be Monitored Spin up a CentOS 6.3 圆4 droplet that will be used to connect to all your other servers.įor our example, this monitoring server's IP is 198.211.117.251.Īll the future config snippets will reference this IP, so make sure to change it to your own value.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |