Hướng dẫn gửi cảnh báo nagios qua mail

Chuyên đề IT Monitoring TRIỂN KHAI HỆ THỐNG GIÁM SÁT VÀ CẢNH BÁO QUA EMAIL, SMS (DÙNG USB 3G) VỚI NAGIOS

Chuyên đề IT Monitoring TRIỂN KHAI HỆ THỐNG GIÁM SÁT VÀ CẢNH BÁO QUA EMAIL, SMS (DÙNG USB 3G) VỚI NAGIOS

Chuyên đề IT Monitoring TRIỂN KHAI HỆ THỐNG GIÁM SÁT VÀ CẢNH BÁO QUA EMAIL, SMS (DÙNG USB 3G) VỚI NAGIOS

Chuyên đề IT Monitoring TRIỂN KHAI HỆ THỐNG GIÁM SÁT VÀ CẢNH BÁO QUA EMAIL, SMS (DÙNG USB 3G) VỚI NAGIOS


Pengembangan model layanan evaluasi berbasis context input process product (CIPP) merupakan salah satu bentuk solusi dari permasalahan guru BK dalam melaksanakan evaluasi terkait dengan layanan informasi yang telah dilakukan. Pengembangan model CIPP ini muncul karena kurang pahamnya guru BK dalam melakukan evaluasi sehingga menyebabkan kesulitan untuk mengetahui keberhasilan pelaksanaan layanan informasi di sekolah, lemahnya akuntabilitas dan kesulitan untuk melakukan perbaikan serta pengembangan. Melalui model context input process product (CIPP) ini, evaluasi layanan informasi dapat dilakukan secara komprehensif.

Đặt vấn đề: Bên cạnh y đức, tính chuyên nghiệp trong y khoa là một trong những năng lực cốt lõi của Điều Dưỡng tác động trực tiếp đến hiệu quả chăm sóc quản lý người bệnh. Do đó, việc xác định mức độ nhận thức của điều dưỡng về tính chuyên nghiệp là nhu cầu cấp thiết trong xây dựng chương trình huấn luyện tính chuyên nghiệp cho điều dưỡng hiệu quả và hội nhập khu vực. Mục tiêu: Xác định mức độ nhận thức của sinh viên và cựu sinh viên với các giá trị cốt lõi tính chuyên nghiệp và sự khác biệt về mức độ nhận thức về giá trị cốt lõi tính chuyên nghiệp trong hai nhóm. Phương pháp nghiên cứu: thiết kế mô tả cắt ngang từ 01/10/2020 đến 20/02/2021, thực hiện trên 208 sinh viên và 88 cựu sinh viên khoa Điều Dưỡng tại trường Đại Học Quốc Tế Miền Đông, tỉnh Bình Dương sử dụng bảng câu hỏi tính chuyên nghiệp trong y khoa áp dụng thang likert 1-5 gồm 6 thành tố đo lường tính chuyên nghiệp. Hệ số Cronbach’s Alpha của toàn thang đo 0,91 để đánh giá nhận thức các giá trị cốt lõi tính chuyên nghiệp...

The

define contactgroup{

    contactgroup_name                   _Group1_
    alias                               _GroupAlias_
    members                             _Contact1,Contact2_
}

0 directive is used to define the service states for which notifications can be sent out to this contact. Valid options are a combination of one or more of the following:

  • define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    } 1: Notify on WARNING service states
  • define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    } 2: Notify on UNKNOWN service states
  • define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    } 3: Notify on CRITICAL service states
  • define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    } 4: Notify on service RECOVERY (OK states)
  • define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    } 5: Notify when the service starts and stops FLAPPING
  • define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    } 6: Do not notify the contact on any type of service notifications

The

define contactgroup{

    contactgroup_name                   _Group1_
    alias                               _GroupAlias_
    members                             _Contact1,Contact2_
}

7 directive is used to define the host states for which notifications can be sent out to this contact. Valid options are a combination of one or more of the following:

  • define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    } 8: Notify on DOWN host states
  • define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    } 2: Notify on UNREACHABLE host states
  • define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    } 4: Notify on host RECOVERY (UP states)
  • define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    } 5: Notify when the host starts and stops FLAPPING
  • define host{ name gluster-generic-host use linux-server notifications_enabled 1 notification_period 24x7 notification_interval 120 notification_options d,u,r,f,s register 0 contact_groups Group1 contacts Contact1,Contact2

    } define service { name gluster-service use generic-service notifications_enabled 1 notification_period 24x7 notification_options w,u,c,r,f,s notification_interval 120 register 0

    gluster_entity Service contact_groups _Group1 contacts Contact1,Contact2 } 2: Send notifications when host or service scheduled downtime starts and ends
  • define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    } 6: Do not notify the contact on any type of host notifications.

By default, a contact and a contact group are defined for administrators in

define host{ name gluster-generic-host use linux-server notifications_enabled 1 notification_period 24x7 notification_interval 120 notification_options d,u,r,f,s register 0 contact_groups Group1 contacts Contact1,Contact2 } define service { name gluster-service use generic-service notifications_enabled 1 notification_period 24x7 notification_options w,u,c,r,f,s notification_interval 120 register 0 gluster_entity Service contact_groups _Group1 contacts Contact1,Contact2 }

4 and all the services and hosts will notify the administrators. Add suitable email id for administrator in

define host{ name gluster-generic-host use linux-server notifications_enabled 1 notification_period 24x7 notification_interval 120 notification_options d,u,r,f,s register 0 contact_groups Group1 contacts Contact1,Contact2 } define service { name gluster-service use generic-service notifications_enabled 1 notification_period 24x7 notification_options w,u,c,r,f,s notification_interval 120 register 0 gluster_entity Service contact_groups _Group1 contacts Contact1,Contact2 }

4 file.

  • To add a group to which the mail need to be sent, add the details as given below: define contactgroup{
        contactgroup_name                   Group1  
        alias                               GroupAlias  
        members                             Contact1,Contact2  
    
    }
  • In the define host{ name gluster-generic-host use linux-server notifications_enabled 1 notification_period 24x7 notification_interval 120 notification_options d,u,r,f,s register 0 contact_groups Group1 contacts Contact1,Contact2

    } define service { name gluster-service use generic-service notifications_enabled 1 notification_period 24x7 notification_options w,u,c,r,f,s notification_interval 120 register 0

    gluster_entity Service contact_groups _Group1 contacts Contact1,Contact2 } 6 file specify the contact name and contact group name for the services for which the notification need to be sent, as shown below: Add define host{ name gluster-generic-host use linux-server notifications_enabled 1 notification_period 24x7 notification_interval 120 notification_options d,u,r,f,s register 0 contact_groups Group1 contacts Contact1,Contact2

    } define service { name gluster-service use generic-service notifications_enabled 1 notification_period 24x7 notification_options w,u,c,r,f,s notification_interval 120 register 0

    gluster_entity Service contact_groups _Group1 contacts Contact1,Contact2 } 7 name and define host{ name gluster-generic-host use linux-server notifications_enabled 1 notification_period 24x7 notification_interval 120 notification_options d,u,r,f,s register 0 contact_groups Group1 contacts Contact1,Contact2

    } define service { name gluster-service use generic-service notifications_enabled 1 notification_period 24x7 notification_options w,u,c,r,f,s notification_interval 120 register 0

    gluster_entity Service contact_groups _Group1 contacts Contact1,Contact2 } 8 name. define host{ name gluster-generic-host use linux-server notifications_enabled 1 notification_period 24x7 notification_interval 120 notification_options d,u,r,f,s register 0 contact_groups Group1 contacts Contact1,Contact2

    } define service { name gluster-service use generic-service notifications_enabled 1 notification_period 24x7 notification_options w,u,c,r,f,s notification_interval 120 register 0

    gluster_entity Service contact_groups _Group1 contacts Contact1,Contact2

    } You can configure notification for individual services by editing the corresponding node configuration file. For example, to configure notification for brick service, edit the corresponding node configuration file as shown below: define service { use brick-service

    VOL_NAME _VolumeName _GENERATED_BY_AUTOCONFIG 1 notes Volume : _VolumeName host_name RedHatStorageNodeName BRICK_DIR _brickpath service_description Brick Utilization - brickpath contact_groups Group1
     contacts                 Contact1,Contact2  
    
    }
  • To receive detailed information on every update when Cluster Auto-Config is run, edit define host{ name gluster-generic-host use linux-server notifications_enabled 1 notification_period 24x7 notification_interval 120 notification_options d,u,r,f,s register 0 contact_groups Group1 contacts Contact1,Contact2

    } define service { name gluster-service use generic-service notifications_enabled 1 notification_period 24x7 notification_options w,u,c,r,f,s notification_interval 120 register 0

    gluster_entity Service contact_groups _Group1 contacts Contact1,Contact2

    } 9 file add define service { use brick-service

    VOL_NAME _VolumeName _GENERATED_BY_AUTOCONFIG 1 notes Volume : _VolumeName host_name RedHatStorageNodeName BRICK_DIR _brickpath service_description Brick Utilization - brickpath contact_groups Group1
     contacts                 Contact1,Contact2  
    
    }

    0 after define service { use brick-service

    VOL_NAME _VolumeName _GENERATED_BY_AUTOCONFIG 1 notes Volume : _VolumeName host_name RedHatStorageNodeName BRICK_DIR _brickpath service_description Brick Utilization - brickpath contact_groups Group1
     contacts                 Contact1,Contact2  
    
    }

    1 option in define service { use brick-service

    VOL_NAME _VolumeName _GENERATED_BY_AUTOCONFIG 1 notes Volume : _VolumeName host_name RedHatStorageNodeName BRICK_DIR _brickpath service_description Brick Utilization - brickpath contact_groups Group1
     contacts                 Contact1,Contact2  
    
    }

    2 and define service { use brick-service

    VOL_NAME _VolumeName _GENERATED_BY_AUTOCONFIG 1 notes Volume : _VolumeName host_name RedHatStorageNodeName BRICK_DIR _brickpath service_description Brick Utilization - brickpath contact_groups Group1
     contacts                 Contact1,Contact2  
    
    }

    3command definition as shown below:

    'notify-service-by-email' command definition

    define command{
        command_name    notify-service-by-email  
        command_line    /usr/bin/printf "%b" "* Nagios *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n $NOTIFICATIONCOMMENT$\n" | /bin/mail -s " $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ " $CONTACTEMAIL$  
        }
  • Restart the Nagios server using the following command: # service nagios restart

The Nagios server sends notifications during status changes to the mail addresses specified in the file.

  • By default, the system ensures three occurances of the event before sending mail notifications.

By default, Nagios Mail notification is sent using

define service { use brick-service VOL_NAME _VolumeName _GENERATED_BY_AUTOCONFIG 1 notes Volume : _VolumeName host_name RedHatStorageNodeName BRICK_DIR _brickpath service_description Brick Utilization - brickpath contact_groups Group1

 contacts                 _Contact1,Contact2_
}

4 command. To change this, modify the definition for

define service { use brick-service VOL_NAME _VolumeName _GENERATED_BY_AUTOCONFIG 1 notes Volume : _VolumeName host_name RedHatStorageNodeName BRICK_DIR _brickpath service_description Brick Utilization - brickpath contact_groups Group1

 contacts                 _Contact1,Contact2_
}

5 command and

define service { use brick-service VOL_NAME _VolumeName _GENERATED_BY_AUTOCONFIG 1 notes Volume : _VolumeName host_name RedHatStorageNodeName BRICK_DIR _brickpath service_description Brick Utilization - brickpath contact_groups Group1

 contacts                 _Contact1,Contact2_
}

2 command in

define host{ name gluster-generic-host use linux-server notifications_enabled 1 notification_period 24x7 notification_interval 120 notification_options d,u,r,f,s register 0 contact_groups Group1 contacts Contact1,Contact2 } define service { name gluster-service use generic-service notifications_enabled 1 notification_period 24x7 notification_options w,u,c,r,f,s notification_interval 120 register 0 gluster_entity Service contact_groups _Group1 contacts Contact1,Contact2 }

9 file and configure the mail server accordingly.