[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-sunucu
Subject: [Linux-sunucu] Icinga Mail Alma Problemi
From: "Muharrem Aydin" <muharrem () muharremaydin ! com>
Date: 2014-06-20 14:09:45
Message-ID: 3184b811e4906b3e0f269f2dde59a5d7 () muharremaydin ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Merhabalar,
Icinga server #apt-get install postfix kurulumunu yaptim....
icinga server dan gelen Critical ve Warning mesajlarini cok gec aliyorum.. acaba \
neyden kaynaklanabilir ? ben yapmis oldugum konfigurasyonu buraya yaziyorum... Test \
icin HDD ve CPU nun degerlerini düsrüdüm Icinga da Critical uyarisi aliyorum \
Hardiksin Uyarisi Maile geliyor ama gec geliyor..... CPU hic gelmiyor.. Acaba nerede \
yanlis yapiyorum ?
# nano /etc/icinga/objects/contacts_icinga.cfg
define contact {
contact_name root
host_notifications_enabled 1
host_notification_period 24x7
host_notification_options d,u,r
host_notification_commands notify-host-by-email
service_notifications_enabled 1
service_notification_period 24x7
service_notification_options w,u,c,r
#service_notification_commands notify-by-email
service_notification_commands notify-service-by-email
email \
aydin@test.de }
define contactgroup{
contactgroup_name admins
alias Icinga Administrators
members root
}
# nano /usr/share/doc/icinga-common/examples/template-object/contacts.cfg
define contact{
contact_name icingaadmin ; \
Short name of user
use generic-contact \
; Inherit default values from generic-contact template (defined \
above)
alias Icinga Admin \
; Full name of user
email aydin@test.de \
; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ****** }
###############################################################################
###############################################################################
#
# CONTACT GROUPS
#
###############################################################################
###############################################################################
# We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.
define contactgroup{
contactgroup_name admins
alias Icinga Administrators
members icingaadmin
}
# nano /etc/icinga/commands.cfg
# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Icinga *****\n\n \
\Notification Type: $NOTIFICATIONTYPE$\n \Host: $HOSTNAME$\n \State: $HOSTSTATE$\n \
\Address: $HOSTADDRESS$\n \Info: $HOSTOUTPUT$\n\n \ Date/Time: $LONGDATETIME$\n" | \
/usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" \
$CONTACTEMAIL$ }
# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Icinga *****\n\n \
\Notification Type: $NOTIFICATIONTYPE$\n\n \Service: $SERVICEDESC$\n \Host: \
$HOSTALIAS$\n \Address: $HOSTADDRESS$\n \State: $SERVICESTATE$\n\n \Date/Time: \
$LONGDATETIME$\n\n \Additional Info:\n\n \$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** \
$NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" \
$CONTACTEMAIL$ }
# nano windows.cfg
define host{
use generic-host ; \
Name of host template to use host_name test
alias test
address 192.168.200.21
contact_groups admins
contacts root
}
define service{
use \
generic-service ; Name of service template to use host_name \
test service_description Disk FreeSpace
check_command \
check_snmp_storage!public![^C]:!1!2 notification_period \
24x7 notification_interval 30
notification_options c,w
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
contact_groups admins
contacts root
}
define service{
use generic-service \
; Name of service template to use host_name \
test service_description CPU Load
check_command snmp_cpu!public!1!2
notification_period 24x7
notification_interval 30
notification_options c,w
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
contact_groups admins
contacts root
}
# nano /etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
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
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = icingamon.test.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = icingamon.test.com, localhost.test.com, , localhost
relayhost = 192.168.200.121 ( Exchange Server Ip si )
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
[Attachment #5 (text/html)]
<div class="iw_mail" dir="LTR">Merhabalar,<div><br></div><div>Icinga server #apt-get \
install postfix kurulumunu yaptim....</div><div><br></div><div>icinga server dan \
gelen Critical ve Warning mesajlarini cok gec aliyorum.. acaba neyden kaynaklanabilir \
? ben yapmis oldugum konfigurasyonu buraya yaziyorum... Test icin HDD ve CPU nun \
degerlerini düsrüdüm Icinga da Critical uyarisi aliyorum Hardiksin Uyarisi \
Maile geliyor ama gec geliyor..... CPU hic gelmiyor.. Acaba nerede yanlis yapiyorum \
?</div><div><br></div><div><b><font color="#ee0000"># nano \
/etc/icinga/objects/contacts_icinga.cfg</font></b></div><div><br></div><div><div>define \
contact {</div><div> contact_name \
\
root</div><div> host_notifications_enabled \
1</div><div> host_notification_period \
24x7</div><div> \
host_notification_options \
d,u,r</div><div> host_notification_commands \
notify-host-by-email</div><div> \
service_notifications_enabled 1</div><div> \
service_notification_period \
24x7</div><div> service_notification_options \
w,u,c,r</div><div> \
#service_notification_commands notify-by-email</div><div> \
service_notification_commands notify-service-by-email</div><div> \
email \
\
aydin@test.de</div><div> \
}</div></div><div><br></div><div><br></div><div><div>define \
contactgroup{</div><div> contactgroup_name \
admins</div><div> alias \
Icinga \
Administrators</div><div> members \
\
root</div><div><br></div><div> \
}</div></div><div><br></div><div><br></div><div><br></div><div><b><font \
color="#ee0000"># nano \
/usr/share/doc/icinga-common/examples/template-object/contacts.cfg</font></b></div><div><br></div><div><div>define \
contact{</div><div> contact_name \
icingaadmin \
; Short name of user</div><div> use \
\
generic-contact ; \
Inherit default values from generic-contact template (defined above)</div><div> \
alias \
Icinga Admin \
; Full name of user</div><div><br></div><div> \
email \
aydin@test.de \
; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS \
******</div><div> \
}</div><div><br></div><div><br></div><div><br></div><div>############################# \
##################################################</div><div>###############################################################################</div><div>#</div><div># \
CONTACT GROUPS</div><div>#</div><div>################################################# \
##############################</div><div>###############################################################################</div><div><br></div><div># \
We only have one contact in this simple configuration file, so there is</div><div># \
no need to create more than one contact group.</div><div><br></div><div>define \
contactgroup{</div><div> contactgroup_name \
admins</div><div> alias \
Icinga \
Administrators</div><div> members \
icingaadmin</div><div> \
}</div></div><div><br></div><div><br></div><div><font \
color="#ee0000"><b># nano \
/etc/icinga/commands.cfg</b></font></div><div><br></div><div><br></div><div><div># \
'notify-host-by-email' command definition</div><div>define command{</div><div> \
command_name notify-host-by-email</div><div> \
command_line /usr/bin/printf "%b" "***** Icinga \
*****\n\n \Notification Type: $NOTIFICATIONTYPE$\n \Host: $HOSTNAME$\n \State: \
$HOSTSTATE$\n \Address: $HOSTADDRESS$\n \Info: $HOSTOUTPUT$\n\n \ Date/Time: \
$LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is \
$HOSTSTATE$ **" $CONTACTEMAIL$</div><div> \
}</div><div><br></div><div># 'notify-service-by-email' command \
definition</div><div>define command{</div><div> \
command_name notify-service-by-email</div><div> \
command_line /usr/bin/printf "%b" "***** Icinga *****\n\n \
\Notification Type: $NOTIFICATIONTYPE$\n\n \Service: $SERVICEDESC$\n \Host: \
$HOSTALIAS$\n \Address: $HOSTADDRESS$\n \State: $SERVICESTATE$\n\n \Date/Time: \
$LONGDATETIME$\n\n \Additional Info:\n\n \$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** \
$NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" \
$CONTACTEMAIL$</div><div> \
}</div></div><div><br></div><div><br></div><div><font color="#ee0000"><b># nano \
windows.cfg</b></font></div><div><br></div><div><br></div><div><br></div><div><div>define \
host{</div><div> use \
generic-host \
; Name of host template to use</div><div> \
host_name \
test</div><div> alias \
test</div><div> \
address \
192.168.200.21</div><div> contact_groups \
admins</div><div> contacts \
\
root</div><div> \
}</div></div><div><br></div><div><br></div><div><div>define service{</div><div> \
use \
\
generic-service ; Name of service template to \
use</div><div> host_name \
\
test</div><div> service_description \
Disk FreeSpace</div><div> \
check_command \
check_snmp_storage!public![^C]:!1!2</div><div> \
notification_period \
24x7</div><div> \
notification_interval \
30</div><div> notification_options \
c,w</div><div> \
check_period \
24x7</div><div> check_interval \
\
5</div><div> retry_interval \
1</div><div> \
max_check_attempts \
10</div><div> contact_groups \
admins</div><div> \
contacts \
root</div><div><br></div><div> \
}</div><div><br></div><div><br></div><div>define \
service{</div><div> use \
\
generic-service ; Name of service template to \
use</div><div> host_name \
test</div><div> \
service_description \
CPU Load</div><div> check_command \
snmp_cpu!public!1!2</div><div> \
notification_period \
24x7</div><div> notification_interval \
30</div><div> \
notification_options \
c,w</div><div> check_period \
24x7</div><div> \
check_interval \
5</div><div> retry_interval \
1</div><div> \
max_check_attempts \
10</div><div> contact_groups \
admins</div><div> \
contacts \
root</div><div> \
}</div></div><div><br></div><div><br></div><div><b><font color="#ee0000"># nano \
/etc/postfix/main.cf</font></b></div><div><br></div><div><br></div><div><div># See \
/usr/share/postfix/main.cf.dist for a commented, more complete \
version</div><div><br></div><div><br></div><div># Debian specific: Specifying a \
file name will cause the first</div><div># line of that file to be used as the name. \
The Debian default</div><div># is /etc/mailname.</div><div>#myorigin = \
/etc/mailname</div><div><br></div><div>smtpd_banner = $myhostname ESMTP $mail_name \
(Debian/GNU)</div><div>biff = no</div><div><br></div><div># appending .domain is the \
MUA's job.</div><div>append_dot_mydomain = no</div><div><br></div><div># Uncomment \
the next line to generate "delayed mail" warnings</div><div>#delay_warning_time = \
4h</div><div><br></div><div>readme_directory = no</div><div><br></div><div># TLS \
parameters</div><div>smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem</div><di \
v>smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key</div><div>smtpd_use_tls=yes</div><div>smtpd_tls_session_cache_database \
= btree:${data_directory}/smtpd_scache</div><div>smtp_tls_session_cache_database = \
btree:${data_directory}/smtp_scache</div><div><br></div><div># See \
/usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for</div><div># \
information on enabling SSL in the smtp \
client.</div><div><br></div><div><b>myhostname = \
icingamon.test.com</b></div><div>alias_maps = \
hash:/etc/aliases</div><div>alias_database = hash:/etc/aliases</div><div><b>myorigin \
= /etc/mailname</b></div><div>mydestination = icingamon.test.com, localhost.test.com, \
, localhost</div><div><b>relayhost = 192.168.200.121 ( Exchange Server \
Ip si )</b></div><div>mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 \
[::1]/128</div><div>mailbox_size_limit = 0</div><div>recipient_delimiter = \
+</div><div>inet_interfaces = \
all</div></div><div><br></div><div><br></div><div><br></div><div> </div><div><br></div></div>
_______________________________________________
Linux-sunucu E-Posta Listesi
Linux-sunucu@liste.linux.org.tr
Liste kurallar=FDn=FD http://liste.linux.org.tr/kurallar.php ba=F0lant=FDs=
=FDndan okuyabilirsiniz;
Bu Listede neden bulundu=F0unuzu bilmiyorsan=FDz veya art=FDk bu listeden g=
elen e-postalar=FD almak istemiyorsan=FDz a=FEa=F0=FDdaki ba=F0lant=FD adre=
sini kullanarak 1 dakika i=E7inde =FCyeli=F0inizi sonland=FDrabilirsiniz.
https://liste.linux.org.tr/mailman/listinfo/linux-sunucu
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic