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

Create Nagios template files #6

Open
atc0005 opened this issue Dec 19, 2019 · 3 comments
Open

Create Nagios template files #6

atc0005 opened this issue Dec 19, 2019 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request nagios template
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Dec 19, 2019

Goals: Illustrate how this tool is being used internally so that others will have a good starting point for configuring similar Nagios notifications.

At a minimum, here are the command definitions which we have placed in /etc/nagios-plugins/send2teams.cfg:

# 'notify-host-by-teams' command definition
define command{
    command_name    notify-host-by-teams
    command_line    /usr/local/bin/send2teams -convert-eol -silent -team "TEAM_NAME_HERE" -channel "Nagios Notifications" -title "$NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$" -color "#5c5303" -message "<br>Notification Type: $NOTIFICATIONTYPE$<br>Host: $HOSTNAME$<br>State: $HOSTSTATE$<br>Address: $HOSTADDRESS$<br>Info: $HOSTOUTPUT$<br><br>Date/Time: $LONGDATETIME$<br>" -url "$USER101$"
    }
# 'notify-service-by-teams' command definition
define command{
    command_name    notify-service-by-teams
    command_line    /usr/local/bin/send2teams -convert-eol -silent -team "TEAM_NAME_HERE" -channel "Nagios Notifications" -title "$NOTIFICATIONTYPE$ Service Alert: \"$SERVICEDESC$\" for $HOSTNAME$ is $SERVICESTATE$" -color "#5c5303" -message "<br>Notification Type: $NOTIFICATIONTYPE$<br><br>Service: $SERVICEDESC$<br>Host: $HOSTALIAS$<br>Address: $HOSTADDRESS$<br>State: $SERVICESTATE$<br><br>Date/Time: $LONGDATETIME$<br><br>Additional Info:<br><br>$SERVICEOUTPUT$<br><br>$LONGSERVICEOUTPUT$" -url "$USER101$"
    }

Additional files/content to provide:

  • contacts entry
  • group entry
  • service template
  • resource.cfg template block
@atc0005 atc0005 added documentation Improvements or additions to documentation enhancement New feature or request nagios template labels Dec 19, 2019
@atc0005 atc0005 added this to the Future milestone Dec 19, 2019
@atc0005 atc0005 self-assigned this Dec 19, 2019
@atc0005 atc0005 removed their assignment Jan 11, 2021
@atc0005
Copy link
Owner Author

atc0005 commented Jun 16, 2021

The files provided here are a good start; they already showcase using this tool to send notifications to Teams:

https://github.com/atc0005/check-vmware/tree/master/contrib

@atc0005 atc0005 modified the milestones: Future, Next Release Jun 16, 2021
@atc0005
Copy link
Owner Author

atc0005 commented Jun 18, 2021

I'll plan to work this in after the next release.

@atc0005
Copy link
Owner Author

atc0005 commented Apr 11, 2022

The files provided here are a good start; they already showcase using this tool to send notifications to Teams:

https://github.com/atc0005/check-vmware/tree/master/contrib

Future plans are to centralize plugin & help command templates here:

atc0005/nagios-template#10

@atc0005 atc0005 modified the milestones: Future, v0.10.0 Apr 11, 2022
@atc0005 atc0005 modified the milestones: v0.10.0, Future Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request nagios template
Projects
None yet
Development

No branches or pull requests

1 participant