Skip to content

Commit

Permalink
Merge pull request #2 from VGavara/master
Browse files Browse the repository at this point in the history
Release v1.0.0
  • Loading branch information
VGavara authored Apr 11, 2022
2 parents 68ceb66 + 70830f8 commit ebf3503
Show file tree
Hide file tree
Showing 11 changed files with 3,326 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
untracked
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Monitoring Plugins changelog

- [Version 1](#version-1)
* [Release 1.0.0](##release-v1.0.0)

# Version 1

## Release v1.0.0
- Initial release with check_ups plugins
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Contributing to the Monitoring Plugins library project

First of all, thanks for being reading this file! That means that in some way and in some degree you are considering contributing to this project. Though initially conceived as personal project, any community help if welcome.

The next section defines different scenarios of project contribution. It is a good first step if you have an idea of how to collaborate.

# Ways of collaboration

Below you'll find different ways of collaboration sorted by what I consider is more probable collaborations to less probable.

## I want to submit a bug
Most of the contents of this collection were developed years ago, so it's very possible that some of the packages used by the plugins had changed, as happened with the Perl package `Monitoring::Plugin` that, due to copyright issues, was renamed to `Monitoring::Plugin` package.

If you have found a bug the best way of communicating it is by creating a new discussion in the [Spooky Stuff](https://github.com/VGavara/monitoring-plugins/discussions/categories/spooky-stuff) category. Take your time to describe it in the best way: fixing a bug is not always easy, and the more information you provide the easier will be. Any kind of additional data (screenshots, videos, ...) will help, though they were not extrictly necessary.

## I want to suggest a new feature
So you have used the library and missed some feature that would be nice to have. In that case feel free of start a discussion in the [Ideas](https://github.com/VGavara/monitoring-plugins/discussions/categories/ideas) category. Those proposals considered as interesting will be converted into features. Finally they will be programmed to be published in a given release.

## I just have a question
Asking questions is also a way of collaboration: some questions are the inspiration of new features that for sure improve the library. If you have a question, just ask it in the Discussions [Questions & Answers](https://github.com/VGavara/monitoring-plugins/categories/questions-answers) category.

## I want to work on a good first issue
Some existing issues are labelled as "good first issue", meaning that they are a good starting point for begin collaborating in the project. If you have identified such a issue, please contact the repository owner to discuss specific details of the issue before starting coding. In case you didn't have chosen an issue, again contact the repository owner for discussing what could be a your good first issue.

## I want to work on a given issue, no matter is a good first one
You're a brave programmer, no doubt. If you want to be helpful for the project, no matter how, the best way is contacting the repository owner to discuss the best available issue for you.

## I want to be involved in a different way
If you think that you can be valuable for this project in a different, not previously described way, feel free to contact with the repository owner (vgavara) in order to expose your idea.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Vicente Gavara

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# monitoring-plugins
Nagios compatible monitoring plugins
# Nagios compatible monitoring plugins
![License:](https://img.shields.io/github/license/vgavara/monitoring-plugins)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/VGavara/monitoring-plugins?include_prereleases)

# Overview
This repository contains a collection of check plugins for Nagios compatible monitoring engines as, among others, Nagios, Centreon or Icinga

# Contributions to the project
In case you were interested in participating in this project, read [CONTRIBUTING.md](https://github.com/VGavara/monitoring-plugins/tree/stable/CONTRIBUTING.md) for further information.

# Attributions and references
* Nagios is a trademark of Nagios Enterprises, LLC.
44 changes: 44 additions & 0 deletions src/check_ups/check_ups_alarms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# check_ups_alarms. README.

MIB UPS (RFC 1628) supports an active alarms table in the managed device (OID upsAlarmTable, 1.3.6.1.2.1.33.1.6.2). Each table input stores:

- upsAlarmId: An unique active alarm identifier
- upsAlarmDescr: A reference to an alarm description object
- upsAlarmTime: The value of sysUpTime when the alarm condition was detected

MIB includes a list of alarms objects called Well-Known-Alarms:

| ID | OID | DESCRIPTION |
|----|-----|-------------|
| 1 | upsAlarmBatteryBad (1.3.6.1.2.1.33.1.6.3.1) | One or more batteries have been determined to require replacement |
| 2 | upsAlarmOnBattery (1.3.6.1.2.1.33.1.6.3.2) | The UPS is drawing power from the batteries |
| 3 | upsAlarmLowBattery (1.3.6.1.2.1.33.1.6.3.3) | The remaining battery run-time is less than or equal to upsConfigLowBattTime |
| 4 | upsAlarmDepletedBattery (1.3.6.1.2.1.33.1.6.3.4) | The UPS will be unable to sustain the present load when and if the utility power is lost |
| 5 | upsAlarmTempBad (1.3.6.1.2.1.33.1.6.3.5) | A temperature is out of tolerance |
| 6 | upsAlarmInputBad (1.3.6.1.2.1.33.1.6.3.6) | An input condition is out of tolerance |
| 7 | upsAlarmOutputBad (1.3.6.1.2.1.33.1.6.3.7) | An output condition (other than OutputOverload) is out of tolerance |
| 8 | upsAlarmOutputOverload (1.3.6.1.2.1.33.1.6.3.8) | The output load exceeds the UPS output capacity |
| 9 | upsAlarmOnBypass (1.3.6.1.2.1.33.1.6.3.9) | The Bypass is presently engaged on the UPS |
| 10 | upsAlarmBypassBad (1.3.6.1.2.1.33.1.6.3.10) | The Bypass is out of tolerance |
| 11 | upsAlarmOutputOffAsRequested (1.3.6.1.2.1.33.1.6.3.11) | The UPS has shutdown as requested, i.e., the output is off |
| 12 | upsAlarmUpsOffAsRequested (1.3.6.1.2.1.33.1.6.3.12) | The entire UPS has shutdown as commanded |
| 13 | upsAlarmChargerFailed (1.3.6.1.2.1.33.1.6.3.13) | An uncorrected problem has been detected within the UPS charger subsystem |
| 14 | upsAlarmUpsOutputOff (1.3.6.1.2.1.33.1.6.3.14) | The output of the UPS is in the off state |
| 15 | upsAlarmUpsSystemOff (1.3.6.1.2.1.33.1.6.3.15) | The UPS system is in the off state |
| 16 | upsAlarmFanFailure (1.3.6.1.2.1.33.1.6.3.16) | The failure of one or more fans in the UPS has been detected |
| 17 | upsAlarmFuseFailure (1.3.6.1.2.1.33.1.6.3.17) | The failure of one or more fuses has been detected |
| 18 | upsAlarmGeneralFault (1.3.6.1.2.1.33.1.6.3.18) | A general fault in the UPS has been detected |
| 19 | upsAlarmDiagnosticTestFailed (1.3.6.1.2.1.33.1.6.3.19) | The result of the last diagnostic test indicates a failure |
| 20 | upsAlarmCommunicationsLost (1.3.6.1.2.1.33.1.6.3.20) | A problem has been encountered in the communications between the agent and the UPS |
| 21 | upsAlarmAwaitingPower (1.3.6.1.2.1.33.1.6.3.21) | The UPS output is off and the UPS is awaiting the return of input power |
| 22 | upsAlarmShutdownPending (1.3.6.1.2.1.33.1.6.3.22) | A upsShutdownAfterDelay countdown is underway |
| 23 | upsAlarmShutdownImminent (1.3.6.1.2.1.33.1.6.3.23) | The UPS will turn off power to the load in less than 5 seconds; this may be either a timed shutdown or a low battery shutdown |
| 24 | upsAlarmTestInProgress (1.3.6.1.2.1.33.1.6.3.24) | A test is in progress, as initiated and indicated by the Test Group. Tests initiated via other implementation-specific mechanisms can indicate the presence of the testing in the alarm table, if desired, via a OBJECT-IDENTITY macro in the MIB document specific to that implementation and are outside the scope of this OBJECT-IDENTITY |

Note that the upsAlarmDescr field stores the alarm OID, not to the description itself. For instance, this should be a valid alarm table entry:

- upsAlarmId: 1
- upsAlarmDescr: 1.3.6.1.2.1.33.1.6.3.3
- upsAlarmTime: (whatever UTIME valid value)

See http://monitoringtt.blogspot.com/2017/10/plugin-of-month-checking-ups-alarms.html for more information.
Loading

0 comments on commit ebf3503

Please sign in to comment.