Adding to groups

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
gloria
Posts: 2
Joined: Sat Feb 11, 2017 2:26 am

Adding to groups

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Adding to groups

Post 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.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
gloria
Posts: 2
Joined: Sat Feb 11, 2017 2:26 am

Re: Adding to groups

Post by gloria »

i will try that and let you know. thank you so much for your help
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Adding to groups

Post by scottwilkerson »

gloria wrote:i will try that and let you know. thank you so much for your help
Sounds good!
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
h4doukeeN
Posts: 63
Joined: Wed Aug 09, 2017 9:32 am

Re: Adding to groups

Post 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
        }
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Adding to groups

Post by scottwilkerson »

that should do it
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked