Jelenlegi hely
monit - rendszermonitor
Mostanaban egy kicsit foglalkoztam a monit nevu rendszer-monitorral, lasd.: www.tildeslash.com aminek az elonye abban all, hogy a normal "rendszer-monitorozas" (olvasgatni a logokat, ill van egy-ket kivonatolo cucc, illete grafikus mutyurkek is) lehetosegeit meghaladva: a konfig megirasakor 'meg lehet 'mondani' neki, hogy milyen esemenyek, illetve folyamatok bekovetkeztekor mit tegyen.
Vagyis: figyeltetheto vele pl.: pid, sock, port, memoria-hasznalat, cpu-hasznalat, eszkoz, konyvtar, fajl, tavoli szerver stb. Ha valami galiba tortenik az egyik szerverrel (vagy barmivel), akkor azt a monit ujrainditja (akar), vagy pl: DoS-tamadas van folyamatban es apache egyre tobb memoriat hasznal fel akkor azt ujrainditja (vagy egyebkent tesz barimt, amit az adott esemenyre hasznosnak talaltunk). Igy nem kell ott ulnunk a szerver mellett es azonnal reagalnunk az esemenyekre /akar ejjel 2-kor/ monit ezt megteszi helyettunk.
Nem volt tul sok idom a dologra, igy egyelore az alabbi konfigot tudtam kifaragni, boven van meg rajta csiszolni-valo. Mindenesetre igy mar mukodokepes.
Ebben a peldaban monit 2-percenkent korulnez es ha rendellenesseget eszlel, akkor vegrehajtja a programozott akciot es mailben tajekoztatja a sysadmint (vagy barkit) majd visszamegy aludni.
Ezen kivul meg a 2812 porton szolgaltat egy webes feluletet (le lehet kapcsolni, nem muszaj hasznalni) ahol reszletes adatokat mutat a konfig szerinti akarmikrol.
Orulnek, ha lennenek javitasi otletek vagy akar sajat tapasztalatatok.
#####################
## /etc/monit/monitrc
#####################
# --------------------------------------------------------------------
# base configuration
# --------------------------------------------------------------------
set daemon 120 # Poll at 2-minute intervals
set logfile syslog # Set syslog as the logfile
set mailserver localhost # Use localhost as the smtp server
set mail-format { from: monit@foo.net }
# Set a default mail from address for
# all alert messages emitted by monit
set alert webmaster@foo.net # alert sent to the webmaster
set httpd port 2812 and # Make monit start it's web-server
use address localhost # and only accept connection from localhost
allow localhost # allow localhost to connect to the server and
allow admin:password # root login with password
# --------------------------------------------------------------------
# Service include files:
# ----------------------
# System services
include /etc/monit/includes/syslogd
# Network services
include /etc/monit/includes/inetd
# Login services
include /etc/monit/includes/sshd
# Web services
include /etc/monit/includes/apache
# Antivirus services
include /etc/monit/includes/clamavd
# Mail services
include /etc/monit/includes/sendmail
# Database services
include /etc/monit/includes/mysqld
# Directories
include /etc/monit/includes/sbin
include /etc/monit/includes/bin
##############################
## /etc/monit/includes/syslogd
##############################
# syslog: (system log daemon)
# ---------------------------
check process syslogd with pidfile /var/run/syslogd.pid
start program = "/etc/rc.d/rc.syslog start"
stop program = "/etc/rc.d/rc.syslog stop"
depends syslogd_init, syslogd_bin
check file syslogd_init with path /etc/rc.d/rc.syslog
check file syslogd_bin with path /usr/sbin/syslogd
############################
## /etc/monit/includes/inetd
############################
# inetd: (internet service-manager)
# -----------------------------------
check process inetd with pidfile /var/run/inetd.pid
start program = "/etc/rc.d/rc.inetd start"
stop program = "/etc/rc.d/rc.inetd stop"
depends inetd_init
depends inetd_bin
check file inetd_init with path /etc/rc.d/rc.inetd
check file inetd_bin with path /usr/sbin/inetd
###########################
## /etc/monit/includes/sshd
###########################
# SSH: (secure login service)
# ---------------------------
check process sshd with pidfile /var/run/sshd.pid
start program = "/etc/rc.d/rc.sshd start"
stop program = "/etc/rc.d/rc.sshd stop"
if failed port 22 protocol ssh with timeout 15 seconds then restart
group sshd
depends sshd_init
depends sshd_bin
check file sshd_init with path /etc/rc.d/rc.sshd
group sshd
check file sshd_bin with path /usr/sbin/sshd
group sshd
##############################
## /etc/monit/includes/apache
##############################
# Apache (webserver)
# --------------------
check process apache with pidfile /var/run/httpd.pid
start program = "/etc/rc.d/rc.httpd start"
stop program = "/etc/rc.d/rc.httpd stop"
if mem > 200 Mb then restart
if failed port 80 with timeout 15 seconds then restart
group nogroup
depends apache_init
depends apache_bin
check file apache_init with path /etc/rc.d/rc.httpd
group nogroup
check file apache_bin with path /usr/sbin/apachectl
group nogroup
###############################
## /etc/monit/includes/clamavd
###############################
# Clamavd: (virus scan daemon)
# ----------------------------
check process clamavd with pidfile /var/run/clamav/clamd.pid
start program = "/etc/rc.d/rc.clamav start"
stop program = "/etc/rc.d/rc.clamav stop"
if failed unix /var/run/clamav/clamd.sock then restart
if failed unix /var/run/clamav/clmilter.sock then restart
group clamav
depends clamavd_init
depends clamavd_bin
check file clamavd_init with path /etc/rc.d/rc.clamav
group clamav
check file clamavd_bin with path /usr/local/sbin/clamd
group clamav
##################################
## /etc/monit/includes/sendmail
##################################
# Sendmail (mailserver)
# --------------------
check process sendmail with pidfile /var/run/sendmail.pid
start program = "/etc/rc.d/rc.sendmail start"
stop program = "/etc/rc.d/rc.sendmail stop"
group mail
if mem > 200 Mb then restart
if failed port 25 with timeout 15 seconds then restart
depends sendmail_init
depends sendmail_bin
check file sendmail_init with path /etc/rc.d/rc.sendmail
group mail
check file sendmail_bin with path /usr/sbin/sendmail
group sendmail
#############################
## /etc/monit/includes/mysqld
#############################
# MySql: (Database server)
# ------------------------
check process mysqld with pidfile /var/run/mysql/mysql.pid
start program = "/etc/rc.d/rc.mysqld start"
stop program = "/etc/rc.d/rc.mysqld stop"
if failed unix /var/run/mysql/mysql.sock then restart
if mem > 200 Mb then restart
depends mysqld_init
depends mysqld_bin
depends mysqldsafe_bin
check file mysqld_init with path /etc/rc.d/rc.mysqld
check file mysqld_bin with path /usr/bin/mysql
check file mysqldsafe_bin with path /usr/bin/mysqld_safe
###########################
## /etc/monit/includes/sbin
###########################
check directory sbin with path /sbin
##########################
## /etc/monit/includes/bin
##########################
check directory bin with path /bin
kris *_^O^_*
- A hozzászóláshoz regisztráció és belépés szükséges

Cikkek
A cikkek koze is athelyeztem!
-------------------------------------
"Nekem káosz kell, nem bírom a rendet
Zaj kell, ami megöli a csendet
Élet kell és szabadság
nem valami ostoba hazugság"
Cimlap? OK!
OK, csak legözelebb légyszives használad a
tag-et, hogy ne foglalja el az egész a címoldalt. 8)
BaBo
----------------------------
Ez egy nedves kor
Nappal vér folyik, éjjel bor
Hobo Blues Band - Vadászat
Hasznaltam.:)
Hasznaltam
Csak amikor atirtam, mar te is belenyultal!:)
-------------------------------------
"Nekem káosz kell, nem bírom a rendet
Zaj kell, ami megöli a csendet
Élet kell és szabadság
nem valami ostoba hazugság"
Hálozati monitor
Sziasztok
Ezt a monitot én is szívesen megnézem hátha jó lesz nekem is.
A bajom az, hogy keresnék egy olyan hálózati monitort, ami IP cim és forgalom alapján sorba tudja rakni a userekek. Elég lenne, ha kb 2 óra hosszat tudná vizsgálni a hálót. A baj az, hogy kb 250 user van. Kellene az is, hogy milyen portokat használnak vagy akarnak használni.
Szerintetek van ilyen ?
A segítségeteket elöre is köszönöm
ui.: nem fontos a grafikus felület, tüzfalon futna