Inizio  >  Docs  >  Linux  >  How to  >  open groundwork monitor (nagios)  
open groundwork monitor (nagios)open groundwork monitor (nagios)

Index

Setup on Centos4.7

standard server setup
com:
no mysql
no apache
no java
sendmail
perl-DBI

/etc/hosts
########################
127.0.0.1   localhost   localhost.localdomain
ip       hostname
########################


yum update

jdk.bin
mysql 5 community ed server
mysql 5 community ed client
mysql 5 community ed shared

run_installer.sh

for smstools
yum install gcc mc

tar xfvz smstools.tgz
cd smstools
make
make install
cp ../sms_nagios.pl /usr/local/bin/

#############sms_nagios.pl##################
#!/usr/bin/perl -w
 
# hier einstellen nach wie vielen sekunden der flood lock entfernt werden soll
my $numsec='300'; # 5minuten
 
#Declaration of Perl Modules to use.
use strict;
#use DBI;
#use DBD::mysql;
#use Net::SMTP;
 
#Declaration of used Constants/Variables
my ($msg_body, $msg_sender , $msg_rcpt );
 
#check ob wir richtig aufgerufen werden:
die unless ( scalar(@ARGV)==2 ) ;
 
#main - read incoming sms message and queue it to smsd
        $msg_sender="nagios";
        $msg_rcpt=shift();
        $msg_body=shift();
my $msg_body_160 = substr($msg_body,0,160);
 
# now send the sms's
system("/usr/local/bin/sendsms $msg_rcpt '$msg_body_160'");
#############sms_nagios.pl##################


modify /etc/smsd.conf according smstools.meinemullemaus.de/configure.html
####################################
# Example smsd.conf. Read the manual for a description

devices = GSM1
logfile = /var/log/smsd.log
loglevel = 7

[GSM1]
device = /dev/ttyUSB0
incoming = no
pin = 1634
#####################################

reboot


manual setup

rpm -Uhv groundwork-foundation-pro-1.6.1-35.noarch.rpm
rpm -Uhv groundwork-monitor-core-5.1.1-3.rhel5.i386.rpm
rpm -Uhv --force groundwork-bookshelf-5.2.1-46.noarch.rpm


rpm -Uhv groundwork-monitor-sp-5.2.1.7-22.noarch.rpm

with the last mysql server community version(MySQL-client-community-5.0.67-0.rhel4.i386) some of the sql script of ogwm 5.2.1 are not ok (they use comment like this --text that are not well recognised from mysql) it's needed to replace with # after that type:

mysql < /usr/local/groundwork/databases/create-monitor-sb-db.sql
mysql  monarch < /usr/local/groundwork/databases/monarch.sql
mysql  guava < /usr/local/groundwork/databases/guava.sql
mysql  dashboard < /usr/local/groundwork/databases/insightreports.sql


/etc/init.d/httpd stop
/etc/init.d/gwservices stop
/etc/init.d/nagios stop
/etc/init.d/mysql stop
killall -9 mysqld


/etc/init.d/mysql start
/etc/init.d/gwservices start
/etc/init.d/nagios start
/etc/init.d/httpd start





notify_host_by_sms
/usr/local/bin/sms_nagios.pl $CONTACTADDRESS1$ "Host $HOSTALIAS$ is $HOSTSTATE$ @$LONGDATETIME$ Info: $HOSTOUTPUT$"

notify_by_sms
/usr/local/bin/sms_nagios.pl $CONTACTADDRESS1$ '$SERVICEDESC$ su $HOSTALIAS$ Stato: $SERVICESTATE$  @$LONGDATETIME$ Info: $SERVICEOUTPUT$ - Notif. Type: $NOTIFICATIONTYPE$'


 

To top