Page 1 of 1

Adding to groups

Posted: Thu Jul 12, 2018 5:18 am
by gloria
hey guys,
i want help. i have 4 different departments which works with different servers. i would like each dpt to only receive alerts for their servers.
currently everyone receives all alerts which people now tend to ignore.


Regards
G

Re: Adding to groups

Posted: Thu Jul 12, 2018 7:15 am
by scottwilkerson
I would add create a contact group for each department

Add the correct contacts to the contact groups.

Change the host/service configs to reference the appropriate contact groups vs. the current contacts.

Re: Adding to groups

Posted: Thu Jul 12, 2018 8:21 am
by gloria
i will try that and let you know. thank you so much for your help

Re: Adding to groups

Posted: Thu Jul 12, 2018 8:30 am
by scottwilkerson
gloria wrote:i will try that and let you know. thank you so much for your help
Sounds good!

Re: Adding to groups

Posted: Thu Jul 12, 2018 4:36 pm
by h4doukeeN
creo que esto es lo que necesitas.
I think this is what you need.

Code: Select all

[root@localhost ~]#nano /etc/nagios/objects/contacts.cfg
  GNU nano 2.3.1                              Fichero: /etc/nagios/objects/contacts.cfg

# CONTACTS

define contact{
        contact_name                    nagiosadmin             ; Short name of user
        use                             generic-contact         ; Inherit default values from generic-contact template (defined above)
        alias                           Nagios Admin            ; Full name of user
        email                           homer@simspons.cl  ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
        }

define contact{
        contact_name                    axhgarza             ; Short name of user
        use                             generic-contact         ; Inherit default values from generic-contact template (defined above)
        alias                           AX  Admin            ; Full name of user
        email                           bart@simpsons.cl  ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
        }

# CONTACT GROUPS

define contactgroup{
        contactgroup_name       admins
        alias                   Nagios Administrators
        members                 nagiosadmin
        }

define contactgroup{
        contactgroup_name       axhgarza
        alias                   AX Administrators
        members                 axhgarza
        }

Code: Select all

define host{
        use                     windows-server  ; Inherit default values from a template
        host_name               00-Sv-test     ; The name we're giving to this host
        alias                   Servidor prueba    ; A longer name associated with the host
        address                 192.168.2.188    ; IP address of the host
        max_check_attempts      1
        contact_groups          axhgarza
        }



define service{
        use                     generic-service
        host_name               00-Sv-test
        service_description     Servicio TV TEST
        check_command           check_nt!PROCSTATE!-d SHOWALL -l TeamViewer_Service.exe
        check_interval          0.1
        retry_interval          1
        notification_interval   1
        max_check_attempts      1
        contact_groups          axhgarza
        }

Re: Adding to groups

Posted: Thu Jul 12, 2018 4:47 pm
by scottwilkerson
that should do it