Adding to groups

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Adding to groups

Postby gloria » Thu Jul 12, 2018 5:18 am

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
gloria
 
Posts: 2
Joined: Sat Feb 11, 2017 2:26 am

Re: Adding to groups

Postby scottwilkerson » Thu Jul 12, 2018 7:15 am

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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 11583
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Adding to groups

Postby gloria » Thu Jul 12, 2018 8:21 am

i will try that and let you know. thank you so much for your help
gloria
 
Posts: 2
Joined: Sat Feb 11, 2017 2:26 am

Re: Adding to groups

Postby scottwilkerson » Thu Jul 12, 2018 8:30 am

gloria wrote:i will try that and let you know. thank you so much for your help

Sounds good!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 11583
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Adding to groups

Postby h4doukeeN » Thu Jul 12, 2018 4:36 pm

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
        }
h4doukeeN
 
Posts: 63
Joined: Wed Aug 09, 2017 9:32 am

Re: Adding to groups

Postby scottwilkerson » Thu Jul 12, 2018 4:47 pm

that should do it
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 11583
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: xuxun and 33 guests