Szevasztok,

Ha nagios-ban definiálok egy hostot, majd rendelek hozzá pár
service-t, és a default notify-service-by-email parancsot
átdefiniálom, konkrétan: használom a $HOSTALIAS$ makró-t benne,
valamiért a figyelmeztető E-Mailben nem jelenik meg az értéke (a
host_name-t látom helyette), pedig a host definíciójában is szerepel.
Neten semmit nem írnak, hogy bug lenne, vagy valami.
Akár hogy próbálom, nem műkszik.
Esetleg valaki találkozott már ilyesféle problémával?

A konfigból az erre vonatkozó rész:
define host{
        name                            generic-host
        notifications_enabled           1
        event_handler_enabled           0
        flap_detection_enabled          1
        failure_prediction_enabled      1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
                check_command                   check-host-alive
                max_check_attempts              10
                notification_interval           0
                notification_period             24x7
                notification_options            d,u,r
                contact_groups                  admins
        register                        0       ; nem kell regelni,
csak template
        }

define service{
        name                            generic-service
        active_checks_enabled           1
        passive_checks_enabled          1
        parallelize_check               1
        obsess_over_service             1
        check_freshness                 0
        notifications_enabled           1
        event_handler_enabled           0
        flap_detection_enabled          1
        failure_prediction_enabled      1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
                notification_interval           0
                is_volatile                     0
                check_period                    24x7
                normal_check_interval           5
                retry_check_interval            1
                max_check_attempts              4
                notification_period             24x7
                notification_options            w,u,c,r
                contact_groups                  admins
        register                        0       ; Csak template
        }

define contactgroup{
        contactgroup_name       admins
        alias                   Nagios Adminisztrátorok
        members                 alper
        }

define contact{
        contact_name                    alper
        alias                           Alper061
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,r
        service_notification_commands   notify-service-by-email
        host_notification_commands      notify-host-by-email
        email                           em...@cim.com
        }

define host{
        use                     generic-host
        host_name               localhost
        alias                   VPS
        address                 x.x.x.x ; Termeszetesen itt valos IP
        }

define service{
        use                             generic-service
        host_name                       localhost
        service_description             Load
                check_command                   
check_load!5.0!4.0!3.0!10.0!6.0!4.0
        }

define command{
        command_name    notify-service-by-email
        command_line    /usr/bin/printf "%b" "Kategoria:
$NOTIFICATIONTYPE$, Host: $HOSTALIAS$ (ip: $HOSTADDRESS$),
Szolgaltatas: $SERVICEDESC$ Allapot: $SERVICESTATE$, Debug:
$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$
figyelmeztetes: $HOSTALIAS$/$SERVICEDESC$ **" $CONTACTEMAIL$
}

A helpeket előre is köszönöm!

Üdvözlettel:
---
Alper
_________________________________________________
linux lista      -      linux@mlf.linux.rulez.org
http://mlf.linux.rulez.org/mailman/listinfo/linux

válasz