Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set the ENV NAGIOS_CONTACTEMAIL #1

Open
Haroldzz opened this issue Oct 31, 2016 · 1 comment
Open

set the ENV NAGIOS_CONTACTEMAIL #1

Haroldzz opened this issue Oct 31, 2016 · 1 comment

Comments

@Haroldzz
Copy link

hi, Jason. Please tell me how to set the ENV NAGIOS_CONTACTEMAIL?

@JasonRivers
Copy link
Owner

Hi Harold.

I assume you're referring to the XMPP script?

The NAGIOS_CONTACTEMAIL is sent by Nagios to the command when it's set up as a notification.

I split everything out in to seperate config files in Nagios, here's what I have:

notify-commands.cfg:

define command {
        command_name    notify-by-xmpp
        command_line    $USER3$/notify_by_xmpp -u $USER20$ -p $USER21$ -s $USER22$ -c $USER23$
}

contact-templates.cfg:

define contact {
        name                                    XMPP
        use                                     24x7
        host_notification_commands              notify-by-xmpp
        service_notification_commands           notify-by-xmpp
        register                                0
}

contact-groups.cfg:

define contactgroup {
        contactgroup_name       ServerAdmins
        alias                   ServerAdmins
}

contacts.cfg

define contact {
        contact_name    JasonXMPP
        alias           Jason Rivers (XMPP)
        use             XMPP
        email           <REMOVED>
        contact_groups  ServerAdmins
}

You can then define services with:

contact_groups                  ServerAdmins

This should then all allow Nagios to send XMPP notifications to the defined contact.

Hope this helps.

Jason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants