https://github.com/mattermost-community/mattermost-plugin-nagios
Mattermost plugin to interact with Nagios Core
https://github.com/mattermost-community/mattermost-plugin-nagios
hacktoberfest mattermost mattermost-plugin nagios
Last synced: 6 months ago
JSON representation
Mattermost plugin to interact with Nagios Core
- Host: GitHub
- URL: https://github.com/mattermost-community/mattermost-plugin-nagios
- Owner: mattermost-community
- License: apache-2.0
- Created: 2020-09-18T13:08:33.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-18T11:26:57.000Z (over 1 year ago)
- Last Synced: 2025-04-14T12:14:32.501Z (6 months ago)
- Topics: hacktoberfest, mattermost, mattermost-plugin, nagios
- Language: Go
- Homepage:
- Size: 830 KB
- Stars: 3
- Watchers: 21
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mattermost Nagios Plugin
[](https://circleci.com/gh/mattermost/mattermost-plugin-nagios)
[](https://codecov.io/gh/mattermost/mattermost-plugin-nagios)
[](https://github.com/mattermost/mattermost-plugin-nagios/releases/latest)
[](https://github.com/mattermost/mattermost-plugin-nagios/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22Up+For+Grabs%22+label%3A%22Help+Wanted%22)**Help Wanted Tickets**
Visit https://github.com/mattermost/mattermost-plugin-nagios/issues.
# Contents
- [Overview](#overview)
- [Features](#features)
- [Admin Guide](docs/admin-guide.md)
- [End User Guide](#end-user-guide)
- [Contribute](#contribute)
- [License](#license)
- [Security Vulnerability Disclosure](#security-vulnerability-disclosure)
- [Get Help](#get-help)## Overview
A Mattermost Plugin for Nagios to get logs, alerts, and notifications in Mattermost. Supports Nagios Core >= 4.4.x.
**Maintainers**: [@amwolff](https://github.com/amwolff) & [@DanielSz50](https://github.com/DanielSz50)
## Features
This plugin allows you to:
- Get logs from specific systems without leaving Mattermost.
- Get alerts and notifications resembling the `showlog.cgi` UI instantly delivered.
- Receive system monitoring reports on a subscribed channel.
- Be frequently informed which hosts and services have an abnormal state.
- Receive notifications about changes to the configuration on a subscribed channel.
- Receive a diff between the old and the new version anytime a change has been made to Nagios configuration.This README provides guidance on installation, configuration, and usage.
## [Admin Guide](docs/admin-guide.md)
## End User Guide
### Get Started
### Use the Plugin
### Slash Commands Overview
- `nagios`
- `get-logs `
- `[host|service ]`
- `set-logs-limit `
- `set-logs-start-time `
- `subscribe `
- `unsubscribe `
- `set-report-frequency `### Slash commands
#### nagios
`nagios`
This is the root command.
##### get-logs
`get-logs [ ]`
This action allows you to get alerts or notifications.
Example: `/nagios get-logs alerts`
###### host
`get-logs host `
This optional parameter allows you to get alerts or notifications from a specific host.
Example: `/nagios get-logs alerts host bvmhost-p09-02.iad2.fedoraproject.org`
###### service
`get-logs service `
This optional parameter allows you to get alerts or notifications from a specific service.
Example: `/nagios get-logs alerts service Swap-Is-Low`
##### set-logs-limit
`set-logs-limit `
This action allows you to limit the number of logs `get-logs` fetches.
Example: `/nagios set-logs-limit 10`
##### set-logs-start-time
`set-logs-start-time `
This action allows you to specify the age of the oldest log `get-logs` fetches.
Example: `/nagios set-logs-start-time 3600`
##### subscribe
`subscribe `
This action allows you to subscribe to system monitoring reports or configuration changes on the current channel.
Example: `/nagios subscribe report`
##### unsubscribe
`unsubscribe `
This action allows you to unsubscribe from system monitoring reports or configuration changes on the current channel.
Example: `/nagios unsubscribe configuration-changes`
##### set-report-frequency
`set-report-frequency `
This action allows you to set the frequency of system monitoring reports.
Example: `/nagios set-report-frequency 60`
### FAQ
## Contribute
### Development
This repository uses the [mattermost-plugin-starter-template](https://github.com/mattermost/mattermost-plugin-starter-template). Therefore, developing this plugin is roughly the same as it is with every plugin using the template. All the necessary steps to develop are in the template's repository.
If you are a Nagios admin/user and think there is something this plugin lacks or something that it does could be done another way, let us know! We are trying to develop this plugin based on users' needs. If there is a certain feature you or your team needs, open up an issue, and explain your needs. We will be happy to help.
This plugin only contains a server portion. Read our documentation about the [Developer Workflow](https://developers.mattermost.com/extend/plugins/developer-workflow/) and [Developer Setup](https://developers.mattermost.com/extend/plugins/developer-setup/) for more information about developing and extending plugins.
### Running a Nagios server with Docker
There is a [docker-compose.yml](https://github.com/mattermost/mattermost-plugin-naguis/blob/master/dev/docker-compose.yml) in the `dev` folder of the repository, configured to run a Nagios server for development. You can run `make nagios` in the root of the repository to spin up the Nagios server. The Nagios web application will be served at http://localhost:8080.
You can login with these credentials:
- Username: `nagiosadmin`
- Password: `nagios`### Develop the watcher
To build the watcher, you can use the following command:
```sh
env GOOS=linux GOARCH=amd64 go build -o dist/watcherX.Y.Z.linux-amd64 -a -v cmd/watcher/main.go
```Of course, you can build the watcher for other operating systems and architectures too.
### Deploy with Local Mode
If your Mattermost server is running locally, you can enable [local mode](https://docs.mattermost.com/administration/mmctl-cli-tool.html#local-mode) to streamline deploying your plugin. After configuring it, just run:
```sh
make deploy
```
### Deploy with credentialsAlternatively, you can authenticate with the server's API with a [personal access token](https://docs.mattermost.com/developer/personal-access-tokens.html):
```sh
export MM_SERVICESETTINGS_SITEURL=http://localhost:8065
export MM_ADMIN_TOKEN=j44acwd8obn78cdcx7koid4jkr
make deploy
```See the Development guide section for information about how to contribute to this plugin.
### I saw a bug, I have a feature request or a suggestion
Please file a [GitHub issue](https://github.com/mattermost/mattermost-plugin-nagios/issues), it will be very useful!
Pull Requests are welcome! You can contact us on the [Mattermost Community ~Plugin: Nagios channel](https://community.mattermost.com/core/channels/plugin-nagios).
To avoid having to manually install your plugin, build and deploy your plugin using one of the following options.
### Share Feedback
Feel free to create a [GitHub Issue](https://github.com/mattermost/mattermost-plugin-nagios/issues) or join the [Nagios Plugin channel](https://community.mattermost.com/core/channels/plugin-nagios) on the Mattermost Community server to discuss.
## License
## Security vulnerability disclosure
Please report any security vulnerability to [https://mattermost.com/security-vulnerability-report/](https://mattermost.com/security-vulnerability-report/).
## Get Help