Page 1 of 2

Not Receiving Alerts

Posted: Thu Apr 19, 2012 7:34 am
by vaibhav beohar
Hi Team,

I installed nagios core in my ubuntu server 10.04.3 LTS and my nagios server is working very fine but i am not receiving any alert from nagios,
i am mentioning my all configuration please look into it

Code: Select all

[b] cat /etc/postfix/main.cf
[/b]
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

myhostname = wfdpuser-desktop.xyz.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$mydomain, $mydomain $myhostname.$mydomain
relayhost = blr-ec-msg04-relay.xyz.com
mynetworks = 127.0.0.0/8 10.207.212.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
myorigin = /etc/mailname

Code: Select all

root@wfdpuser-desktop:~# cat /etc/hosts
127.0.0.1       localhost

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
10.207.212.160 wfdpuser-desktop.xyz.com
10.207.212.160 wfdpuser-desktop
10.200.53.98    blr-ec-msg04-relay.xyz.com

Code: Select all

root@wfdpuser-desktop:~# ps aux | grep postfix
root     26758  0.0  0.0  37208  2284 ?        Ss   15:40   0:00 /usr/lib/postfix/master
postfix  26761  0.0  0.0  39432  2372 ?        S    15:40   0:00 qmgr -l -t fifo -u
postfix  31270  0.0  0.0  39272  2252 ?        S    17:20   0:00 pickup -l -t fifo -u -c
root     32525  0.0  0.0   7624   908 pts/1    S+   17:45   0:00 grep --color=auto postfix

Code: Select all

root@wfdpuser-desktop:~# vi /var/log/mail.info

Apr 19 15:29:46 wfdpuser-desktop postfix/cleanup[25783]: B36E07C1C78: message-id=<20120419095946.B36E07C1C78@wfdpuser-desktop>
Apr 19 15:29:46 wfdpuser-desktop postfix/bounce[25782]: 01C767C1BA5: sender non-delivery notification: B36E07C1C78
Apr 19 15:29:46 wfdpuser-desktop postfix/qmgr[25779]: B36E07C1C78: from=<>, size=2212, nrcpt=1 (queue active)
Apr 19 15:29:46 wfdpuser-desktop postfix/qmgr[25779]: 01C767C1BA5: removed
Apr 19 15:29:46 wfdpuser-desktop postfix/smtp[25784]: B36E07C1C78: to=<[email protected]>, relay=none, delay=0.02, delays=0/0/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=wfdpuser-desktop.xyz.com.xyz.com type=AAAA: Host not found)
Apr 19 15:29:46 wfdpuser-desktop postfix/qmgr[25779]: B36E07C1C78: removed
Apr 19 15:30:28 wfdpuser-desktop postfix/master[25775]: terminating on signal 15
Apr 19 15:31:13 wfdpuser-desktop postfix/master[26112]: daemon started -- version 2.7.0, configuration /etc/postfix
Apr 19 15:39:21 wfdpuser-desktop postfix/master[26112]: terminating on signal 15
Apr 19 15:39:21 wfdpuser-desktop postfix/master[26623]: daemon started -- version 2.7.0, configuration /etc/postfix
Apr 19 15:40:01 wfdpuser-desktop postfix/master[26623]: terminating on signal 15
Apr 19 15:40:02 wfdpuser-desktop postfix/master[26758]: daemon started -- version 2.7.0, configuration /etc/postfix
Apr 19 17:28:34 wfdpuser-desktop postfix/pickup[31270]: D14827C1BBC: uid=0 from=<root>
Apr 19 17:28:34 wfdpuser-desktop postfix/cleanup[31735]: D14827C1BBC: message-id=<[email protected]>
Apr 19 17:28:34 wfdpuser-desktop postfix/qmgr[26761]: D14827C1BBC: from=<[email protected]>, size=486, nrcpt=1 (queue active)
Apr 19 17:28:34 wfdpuser-desktop postfix/local[31738]: D14827C1BBC: to=<[email protected]>, orig_to=<test>, relay=local, delay=0.02, delays=0.01/0/0/0, dsn=5.1.1, status=bounced (unknown user: "test")
Apr 19 17:28:34 wfdpuser-desktop postfix/cleanup[31735]: D4E3D7C1C77: message-id=<[email protected]>
Apr 19 17:28:34 wfdpuser-desktop postfix/bounce[31739]: D14827C1BBC: sender non-delivery notification: D4E3D7C1C77
Apr 19 17:28:34 wfdpuser-desktop postfix/qmgr[26761]: D4E3D7C1C77: from=<>, size=2431, nrcpt=1 (queue active)
Apr 19 17:28:34 wfdpuser-desktop postfix/qmgr[26761]: D14827C1BBC: removed
Apr 19 17:28:34 wfdpuser-desktop postfix/local[31738]: D4E3D7C1C77: to=<[email protected]>, relay=local, delay=0, delays=0/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Apr 19 17:28:34 wfdpuser-desktop postfix/qmgr[26761]: D4E3D7C1C77: removed
I have made the changes in contact.cfg file in nagios


Thanks
vaibhav.

Re: Not Receiving Alerts

Posted: Thu Apr 19, 2012 12:24 pm
by wormfishin
If you send mail from the command line of your server, but not nagios, do you receive it?

Re: Not Receiving Alerts

Posted: Thu Apr 19, 2012 6:51 pm
by jsmurphy
Do as wormfishin suggested, see what happens if you try to mail from the command line (I'm going to assume it will bounce as the email attempts from Nagios have). Ask your exchange admin or whoever runs your SMTP relay what the requirements are for mailing through it... does it need TLS? authentication? so on and so forth. The basic config you have looks fine so I'm guessing there's a requirement that it hasn't been configured for yet.

Re: Not Receiving Alerts

Posted: Fri Apr 20, 2012 5:05 am
by vaibhav beohar
NO i am not able to receive mail from my command line as well as my nagios server

i have given all my configuration please look into it.



vaibhav beohar

Re: Not Receiving Alerts

Posted: Fri Apr 20, 2012 7:24 am
by wormfishin
Is this the email address you are trying to send to or from?

wfdpuser-desktop.xyz.com.xyz.com

Re: Not Receiving Alerts

Posted: Fri Apr 20, 2012 9:40 am
by agriffin
Are there any errors in your postfix logs? Also, you could try going through the postfix debugging steps here to help figure out what's wrong.

Re: Not Receiving Alerts

Posted: Wed Jun 13, 2012 8:13 am
by vaibhav beohar
Hi ,

I tried to update my nagios xi with latest release "Nagios XI 2011R3.1" i am getting following error in console window, but my nagios xi got updated and its working fine.
but i am concern about that error. Please look into it.


*** Configuration summary for ndoutils 1.5.1 05-15-2012 ***:

General Options:
-------------------------
NDO2DB user: nagios
NDO2DB group: nagios


Review the options above for accuracy. If they look okay,
type 'make' to compile the NDO utilities.

cd ./src && make
make[1]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.1/src'
gcc -fPIC -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -c -o io.o io.c
gcc -fPIC -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -c -o utils.o utils.c
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -o file2sock file2sock.c io.o utils.o -lm -lnsl
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -o log2ndo log2ndo.c io.o utils.o -lm -lnsl
make ndo2db-2x
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.1/src'
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -c -o db.o db.c
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -D BUILD_NAGIOS_2X -c -o dbhandlers-2x.o dbhandlers.c
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -D BUILD_NAGIOS_2X -o ndo2db-2x queue.c ndo2db.c dbhandlers-2x.o io.o utils.o db.o -lnsl -rdynamic -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto -lm
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.1/src'
make ndo2db-3x
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.1/src'
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -D BUILD_NAGIOS_3X -c -o dbhandlers-3x.o dbhandlers.c
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -D BUILD_NAGIOS_3X -o ndo2db-3x queue.c ndo2db.c dbhandlers-3x.o io.o utils.o db.o -lnsl -rdynamic -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto -lm
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.1/src'
make ndomod-2x.o
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.1/src'
gcc -fPIC -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -D BUILD_NAGIOS_2X -o ndomod-2x.o ndomod.c io.o utils.o -shared -lnsl
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.1/src'
make ndomod-3x.o
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.1/src'
gcc -fPIC -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -D BUILD_NAGIOS_3X -o ndomod-3x.o ndomod.c io.o utils.o -shared -lnsl
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.1/src'
gcc -g -O2 -I/usr/include/mysql -DHAVE_CONFIG_H -o sockdebug sockdebug.c io.o utils.o -lm -lnsl
make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/ndoutils/ndoutils-1.5.1/src'
/usr/bin/install -c -m 755 -o root -g root -d /etc/rc.d/init.d
/usr/bin/install -c -m 755 -o root -g root daemon-init /etc/rc.d/init.d/ndo2db
NDOUTILS POST-UPGRADE...
Current database version: 1.5.1
Database already upgraded.
Stopping ndo2db: done.
Starting ndo2db: done.
Running configuration check...done.
Stopping nagios: done.
Starting nagios: done.
NDOUTILS UPGRADED!
Saving old crontab to /tmp/nagios.crontab.orig...
Removing XI cron jobs...
Saving old crontab to /tmp/root.crontab.orig...
Removing XI cron jobs...
Patching NDOUtils...
NDOUtils already patched at level 102
Yum not configured - skipping prereqs update
Copying over new XI directory...
Building latest perms binary...
Updating sequences...
Nagios XI Postgres Database Sequence Information

OLD VALUES
--------------
xi_commands_command_id_seq = 839
xi_events_event_id_seq = 50669
xi_meta_meta_id_seq = 50717
xi_options_option_id_seq = 99
xi_sysstat_sysstat_id_seq = 99
xi_usermeta_usermeta_id_seq = 401
xi_users_user_id_seq = 49

NEW VALUES
--------------
xi_commands_command_id_seq = 839
xi_events_event_id_seq = 50669
xi_meta_meta_id_seq = 50717
xi_options_option_id_seq = 99
xi_sysstat_sysstat_id_seq = 99
xi_usermeta_usermeta_id_seq = 401
xi_users_user_id_seq = 49

Installing new PNP templates...
Updating init script...
Enabling large install tweaks...
Fixing config file permissions...
Fixing htpasswd permissions...
Checking group memberships...
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Installing new XI templates...
URL: http://localhost/nagiosql/index.php
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosql/index.php --no-check-certificate --post-data 'Submit=Login&tfUsername=nagiosxi&tfPassword=qagak6' -O nagiosql.login--2012-06-13 18:39:08-- http://localhost/nagiosql/index.php
Resolving proxy2.mycompany.com... 10.145.22.10
Connecting to proxy2.mycompany.com|10.145.22.10|:8080... connected.
Proxy request sent, awaiting response... 401 Unauthorized
Authorization failed.
NAGIOSQL LOGIN FAILED!


Do i need to update again ???

Thanks,
Vaibhav.

Re: Not Receiving Alerts

Posted: Wed Jun 13, 2012 9:39 am
by scottwilkerson
Looks like you are trying to use proxies to localhost.

We have a FAQ that describes how to exclude proxies for localhost
http://support.nagios.com/wiki/index.ph ... th_Proxies

Re: Not Receiving Alerts

Posted: Thu Jun 14, 2012 12:26 am
by vaibhav beohar
Thanks for your update, its working now.



cheers,
Vaibhav.

Re: Not Receiving Alerts

Posted: Thu Jun 14, 2012 12:40 am
by vaibhav beohar
Hi One more question.. in my nagios xi home page .. Update check plugin is there.. which is always showing following problem
"Update Check Problem: Last update check failed in nagios xi"
I checked with /usr/local/nagios/libexec location but there is no plugin name as check_xi_updates
How can i make this work???


Thnaks,