Compare commits
211 commits
upstream/2
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
05b203575a | ||
|
003fec0fce | ||
|
d9bb2c8c6e | ||
|
13ac6fb85d | ||
|
a27b58aef1 | ||
|
671e17c224 | ||
|
885218a382 | ||
|
cc498cd2c1 | ||
|
e2bdf2d801 | ||
|
f4939717cc | ||
|
d4bd9c980e | ||
|
fdc0108a3b | ||
|
a193b79f09 | ||
|
4f38dec720 | ||
|
ea50f54621 | ||
|
16004b91a9 | ||
|
7456f80b01 | ||
|
8bb199837f | ||
|
465be3fd0f | ||
|
36ad1226bc | ||
|
0f4afbbbdd | ||
|
1f2afccbd9 | ||
|
aa599482ae | ||
|
f3c51609ef | ||
|
c1b122a000 | ||
|
0fef6a8d27 | ||
|
8f30758d7f | ||
|
9b63fc71c8 | ||
|
547ca5d155 | ||
|
9811573f7b | ||
|
4aab014f0e | ||
|
29710eb01d | ||
|
9f8c9978ba | ||
|
b710d08727 | ||
|
8e8f3679fc | ||
|
9e269571fe | ||
|
731359eeb2 | ||
|
56b1ad412b | ||
|
071a540a61 | ||
|
4ffef4124a | ||
|
5579d164c7 | ||
|
fce5c7b848 | ||
|
476d4488d0 | ||
|
c1f1d2574f | ||
|
8f6cd11fd1 | ||
|
e972bef20f | ||
|
f9bf22008d | ||
|
45b2b11b48 | ||
|
84561d3e52 | ||
|
085ba7e17c | ||
|
ef233ba6df | ||
|
c1ffe3e1b6 | ||
|
a815051cc6 | ||
|
b345ea5557 | ||
|
e989ff9365 | ||
|
a75e780e44 | ||
|
7e46f8e6b3 | ||
|
6abd503b95 | ||
|
f84a199744 | ||
|
f58977803d | ||
|
23c46884d1 | ||
|
56eccb3923 | ||
|
19b6944241 | ||
|
85645deb80 | ||
|
cb17d7e4a2 | ||
|
f45e77a9e1 | ||
|
890a780886 | ||
|
af07b7cbc4 | ||
|
bcc13b46d0 | ||
|
cb66729916 | ||
|
3d095b1adc | ||
|
70b71385af | ||
|
53cdb548ef | ||
|
c07faf2ca9 | ||
|
019d443c1f | ||
|
c0535e4989 | ||
|
f2e8ac9d62 | ||
|
117e400874 | ||
|
ea34bcb779 | ||
|
568042e6bf | ||
|
181c31925c | ||
|
16f0bdc05a | ||
|
0ced9d8da9 | ||
|
75687e089f | ||
|
5f91ad2c6f | ||
|
c466391d09 | ||
|
d014d9b695 | ||
|
0769a79a16 | ||
|
7736030e85 | ||
|
cc5ec0df43 | ||
|
80b3d1e991 | ||
|
ceff8a0846 | ||
|
35909512f0 | ||
|
692a27af19 | ||
|
6f3bacd9b1 | ||
|
74388b3adf | ||
|
c4311320ca | ||
|
9c06100871 | ||
|
1eca1c0377 | ||
|
caf8f93cab | ||
|
2bf53ed0d5 | ||
|
2d8f7ffaf9 | ||
|
2e752907e7 | ||
|
e1970ea767 | ||
|
e4a1040f10 | ||
|
d8d6d1b63a | ||
|
c5e9ec0af1 | ||
|
6cbfcfac62 | ||
|
96dcc51971 | ||
|
8dd4f10e71 | ||
|
f4e3f51037 | ||
|
a8f8669e82 | ||
|
bcecc23a6f | ||
|
672a475f93 | ||
|
a31b4284d5 | ||
|
434d3d0a40 | ||
|
e4c5a528cf | ||
|
4a57e8bec7 | ||
|
f4871c4f9f | ||
|
9157b9d026 | ||
|
76f4f9b381 | ||
|
94da9a07c0 | ||
|
82261f2bec | ||
|
07c8662ef9 | ||
|
24809b6741 | ||
|
3b007969df | ||
|
a46fa6f99e | ||
|
c68e0e16fd | ||
|
fa90d0da60 | ||
|
5b65897930 | ||
|
20f7a79198 | ||
|
ce65e19b32 | ||
|
f529116384 | ||
|
5dbb90525d | ||
|
973f7d983f | ||
|
e3e176df81 | ||
|
f05ed7f8a1 | ||
|
8ca89ae906 | ||
|
93834c1fa1 | ||
|
462339912a | ||
|
c7fb3c5af8 | ||
|
0193501af8 | ||
|
6fa6c288ab | ||
|
76a78cbac0 | ||
|
34070bf001 | ||
|
ab802e45d7 | ||
|
fe8f55b3ec | ||
|
1ae942a30a | ||
|
2fcaf9a4a6 | ||
|
d03e055c32 | ||
|
aaa7106667 | ||
|
8a119de7b8 | ||
|
36735a875f | ||
|
1ea98779dc | ||
|
f82ac54371 | ||
|
9ac5f8ce97 | ||
|
36857aaa2a | ||
|
074ed96751 | ||
|
6adaea0ef1 | ||
|
73c21a07e1 | ||
|
3acf2029d2 | ||
|
950a63f57c | ||
|
976e307720 | ||
|
be2cd6ae28 | ||
|
95479b578f | ||
|
b8ad984e16 | ||
|
1bb96e11dd | ||
|
09c4c1b92b | ||
|
1dfc537f8a | ||
|
258eb2eb89 | ||
|
baa90eb96d | ||
|
e45ee042fb | ||
|
6dcf3571cc | ||
|
ff63fef97f | ||
|
abea817afe | ||
|
e78e5722a7 | ||
|
cdad01dcd8 | ||
|
32904b139f | ||
|
fdd99257df | ||
|
a293226dd7 | ||
|
de4ff5bc1c | ||
|
fadc8eb8ab | ||
|
a7d70f830c | ||
|
87186a998f | ||
|
322a7a7b30 | ||
|
25b9c60306 | ||
|
68acff0cd2 | ||
|
6a3958f364 | ||
|
2f70a5eb26 | ||
|
f1d41e8f6f | ||
|
015f364053 | ||
|
0f71dd79a8 | ||
|
97ba365b56 | ||
|
fb68b9969b | ||
|
86e207f61f | ||
|
12871c69e0 | ||
|
24e3702ec6 | ||
|
580585cbe6 | ||
|
68aa03fde6 | ||
|
10ef56f52b | ||
|
312ee9887f | ||
|
801b91956e | ||
|
0924c1761c | ||
|
f0b4e079cd | ||
|
2a97354a0b | ||
|
24c12a6a5e | ||
|
b7ee033214 | ||
|
6e2485ae65 | ||
|
c51122cb39 | ||
|
98b23393b9 | ||
|
dc54b0930e |
12
.github/dependabot.yml
vendored
Normal file
12
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "04:00"
|
||||
reviewers:
|
||||
- "waja"
|
||||
pull-request-branch-name:
|
||||
separator: "-"
|
||||
open-pull-requests-limit: 10
|
36
.github/workflows/packaging_test.yml
vendored
Normal file
36
.github/workflows/packaging_test.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
name: Packaging Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- $default-branch
|
||||
- development
|
||||
- master
|
||||
# Run tests for any PRs
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
SOURCE_DIR: ./
|
||||
ARTIFACTS_DIR: debian/build/release/
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
env:
|
||||
DEBIAN_FRONTEND: "noninteractive"
|
||||
- name: Remove github artefacts
|
||||
run: |
|
||||
rm -rf .github*
|
||||
- name: Adjust distibution in changelog file
|
||||
run: |
|
||||
sed -i '0,/restricted/s//stable/' debian/changelog
|
||||
- name: Build Debian package
|
||||
uses: dawidd6/action-debian-package@v1.5.0
|
||||
with:
|
||||
artifacts_directory: debian/build/release/
|
||||
os_distribution: testing
|
||||
- name: Debug
|
||||
run: |
|
||||
ls -la
|
71
.github/workflows/release.yml
vendored
Normal file
71
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/tags
|
||||
tags:
|
||||
- 'debian/*' # Push events to matching debian/*, i.e. debian/1.0-2, debian/20.15.10, debian/23.20020326
|
||||
|
||||
name: Release Process
|
||||
|
||||
env:
|
||||
SOURCE_DIR: ./
|
||||
ARTIFACTS_DIR: debian/build/release/
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release-id: ${{ steps.create_release.outputs.id }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install needed packages
|
||||
run: |
|
||||
if [ $(dpkg -l | grep -c dpkg-dev) -ne 1 ]; then sudo apt-get update && sudo apt-get install -y dpkg-dev; fi
|
||||
- name: Gather changelog
|
||||
run: |
|
||||
ls -la
|
||||
dpkg-parsechangelog | tail -n +9 > debian.changelog
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
body_path: debian.changelog
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
build:
|
||||
name: Build and upload packages
|
||||
needs: create-release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
env:
|
||||
DEBIAN_FRONTEND: "noninteractive"
|
||||
- name: Remove github artefacts
|
||||
run: |
|
||||
rm -rf .github*
|
||||
- name: Adjust distibution in changelog file
|
||||
run: |
|
||||
sed -i '0,/restricted/s//stable/' debian/changelog
|
||||
- name: Build Debian package
|
||||
uses: dawidd6/action-debian-package@v1.5.0
|
||||
with:
|
||||
artifacts_directory: debian/build/release/
|
||||
os_distribution: testing
|
||||
# - name: Build Debian package
|
||||
# uses: pi-top/action-debian-package@v0.2.0
|
||||
# with:
|
||||
# artifacts_directory: debian/build/release/
|
||||
# target_architectures: "amd64,i386"
|
||||
- name: Upload the artifacts
|
||||
uses: skx/github-action-publish-binaries@release-2.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
releaseId: ${{ needs.create-release.outputs.release-id }}
|
||||
args: debian/build/release/*
|
59
CHANGELOG.md
Normal file
59
CHANGELOG.md
Normal file
|
@ -0,0 +1,59 @@
|
|||
# Change Log
|
||||
|
||||
## [2.1.0](https://github.com/dnsmichi/manubulon-snmp/tree/2.1.0) (2017-10-12)
|
||||
[Full Changelog](https://github.com/dnsmichi/manubulon-snmp/compare/v2.0.0...2.1.0)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- Cisco SMB switch [\#30](https://github.com/dnsmichi/manubulon-snmp/issues/30)
|
||||
- Allow output for NagVis "weathermap" lines [\#22](https://github.com/dnsmichi/manubulon-snmp/issues/22)
|
||||
- Enhance and write better documentation [\#40](https://github.com/dnsmichi/manubulon-snmp/pull/40) ([dnsmichi](https://github.com/dnsmichi))
|
||||
- Escape dot in perfdata labels [\#39](https://github.com/dnsmichi/manubulon-snmp/pull/39) ([mj84](https://github.com/mj84))
|
||||
- \[\#30\] add support for cisco small business switches \(tested with SG500\) [\#31](https://github.com/dnsmichi/manubulon-snmp/pull/31) ([spali](https://github.com/spali))
|
||||
- Allow output for NagVis "weathermap" lines [\#26](https://github.com/dnsmichi/manubulon-snmp/pull/26) ([miken32](https://github.com/miken32))
|
||||
- Add SNMP v3 authentication dependencies and distro-specific Perl module packages [\#23](https://github.com/dnsmichi/manubulon-snmp/pull/23) ([virtualtam](https://github.com/virtualtam))
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- check\_snmp\_load.pl =\> SNMPv3 do not use the -p \(port\) option [\#27](https://github.com/dnsmichi/manubulon-snmp/issues/27)
|
||||
- Fix typos in documentation [\#29](https://github.com/dnsmichi/manubulon-snmp/pull/29) ([moepot](https://github.com/moepot))
|
||||
- The -p \(port\) option was forgotten in some cases [\#28](https://github.com/dnsmichi/manubulon-snmp/pull/28) ([Niflou](https://github.com/Niflou))
|
||||
- Fix check\_snmp\_int.pl temp file name [\#25](https://github.com/dnsmichi/manubulon-snmp/pull/25) ([waja](https://github.com/waja))
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Have waiting info always [\#4](https://github.com/dnsmichi/manubulon-snmp/issues/4)
|
||||
|
||||
## [v2.0.0](https://github.com/dnsmichi/manubulon-snmp/tree/v2.0.0) (2016-11-25)
|
||||
**Implemented enhancements:**
|
||||
|
||||
- check\_snmp\_load.pl - Linux load multiple CPUs [\#6](https://github.com/dnsmichi/manubulon-snmp/issues/6)
|
||||
- Ignore DOWN state and big snmp requests [\#19](https://github.com/dnsmichi/manubulon-snmp/pull/19) ([SteScho](https://github.com/SteScho))
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- check\_snmp\_process.pl does not honour timeout \(-t\) [\#21](https://github.com/dnsmichi/manubulon-snmp/issues/21)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Apply a programming style to the plugins [\#20](https://github.com/dnsmichi/manubulon-snmp/issues/20)
|
||||
- Get rid of utils.pm [\#10](https://github.com/dnsmichi/manubulon-snmp/issues/10)
|
||||
- Net::SNMP version string no longer numeric in CentOS 7 [\#9](https://github.com/dnsmichi/manubulon-snmp/issues/9)
|
||||
- fortigate 4.3 support for check\_snmp\_load [\#7](https://github.com/dnsmichi/manubulon-snmp/issues/7)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Not all Systems have connections [\#18](https://github.com/dnsmichi/manubulon-snmp/pull/18) ([SteScho](https://github.com/SteScho))
|
||||
- Add the -A/--use-ifalias option to do name lookup from ifAlias [\#17](https://github.com/dnsmichi/manubulon-snmp/pull/17) ([darksoul42](https://github.com/darksoul42))
|
||||
- pnp need perf-data with always same order [\#16](https://github.com/dnsmichi/manubulon-snmp/pull/16) ([SteScho](https://github.com/SteScho))
|
||||
- pnp need perf-data with always same order [\#15](https://github.com/dnsmichi/manubulon-snmp/pull/15) ([SteScho](https://github.com/SteScho))
|
||||
- Add -N/--use-ifname option to switch name lookup from ifDescr to ifName [\#14](https://github.com/dnsmichi/manubulon-snmp/pull/14) ([darksoul42](https://github.com/darksoul42))
|
||||
- Fix, check\_snmtp\_load output [\#12](https://github.com/dnsmichi/manubulon-snmp/pull/12) ([casvcasv](https://github.com/casvcasv))
|
||||
- making checks executable [\#8](https://github.com/dnsmichi/manubulon-snmp/pull/8) ([morgajel](https://github.com/morgajel))
|
||||
- Add Cisco Nexus Devices capability for load [\#3](https://github.com/dnsmichi/manubulon-snmp/pull/3) ([pasancario](https://github.com/pasancario))
|
||||
- Fix typo protcol vs. protocol [\#2](https://github.com/dnsmichi/manubulon-snmp/pull/2) ([waja](https://github.com/waja))
|
||||
- Fix error writing tmp file using plugin with remote unix system [\#1](https://github.com/dnsmichi/manubulon-snmp/pull/1) ([TheCry](https://github.com/TheCry))
|
||||
|
||||
|
||||
|
||||
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
95
README.md
95
README.md
|
@ -1,56 +1,89 @@
|
|||
# Manubulon SNMP Plugins
|
||||
|
||||
## General information
|
||||
#### Table of Contents
|
||||
|
||||
1. [About](#about)
|
||||
2. [License](#license)
|
||||
3. [Support](#support)
|
||||
4. [Requirements](#requirements)
|
||||
5. [Installation](#installation)
|
||||
6. [Configuration](#configuration)
|
||||
7. [FAQ](#faq)
|
||||
8. [Thanks](#thanks)
|
||||
9. [Contributing](#contributing)
|
||||
|
||||
## About
|
||||
|
||||
Manubulon SNMP plugins is a set of Icinga/Nagios plugins
|
||||
to check hosts/devices using the SNMP protocol. Check
|
||||
[http://nagios.manubulon.com](http://nagios.manubulon.com) for more details.
|
||||
to check hosts/devices using the SNMP protocol.
|
||||
|
||||
This is a fork using a [cvs2git import](http://sourceforge.net/projects/nagios-snmp/develop) which includes community patches.
|
||||
### Plugin Overview
|
||||
|
||||
The original project was last active in 2007 so this project
|
||||
helps collect all patches and feature requests.
|
||||
Plugin | Description
|
||||
------------------------------|----------------------------------------
|
||||
check\_snmp\_storage | Storage checks (disks, swap, memory, etc.)
|
||||
check\_snmp\_int | Interface states, usage on hosts, switches, routers, etc.
|
||||
check\_snmp\_process | Running processes, their number, used CPU and memory.
|
||||
check\_snmp\_load | Load/CPU checks
|
||||
check\_snmp\_mem | Memory and swap usage
|
||||
check\_snmp\_env | Environmental status of fan, temp, power supplies.
|
||||
check\_snmp\_vrrp | Interface state of a VRRP cluster
|
||||
check\_snmp\_cpfw | Checkpoint Firewall-1 status
|
||||
check\_snmp\_win | Windows services
|
||||
check\_snmp\_css | CSS service states
|
||||
check\_snmp\_nsbox | Nsbox VHost and diode status
|
||||
check\_snmp\_boostedge | Boostedge services
|
||||
check\_snmp\_linkproof\_ndr | Linkproof NHR
|
||||
|
||||
Feel free to use & distribute it under the original license.
|
||||
## License
|
||||
|
||||
## Requirements
|
||||
|
||||
* perl in /usr/bin/perl
|
||||
* Perl modules `Net::SNMP` and `Getopt::Long` (RHEL: `perl-Net-SNMP perl-Getopt-Long`)
|
||||
* `icinga` user able to write files in /tmp/ directory
|
||||
|
||||
Perl, default directory and temp files location can be changed using the install.sh script.
|
||||
|
||||
`utils.pm` from `Monitoring::Plugin::Perl` is no longer required.
|
||||
|
||||
## Documentation
|
||||
|
||||
The original documentation and sourcecode is located at
|
||||
[http://nagios.manubulon.com](http://nagios.manubulon.com).
|
||||
A website copy was added underneath the `doc/` directory.
|
||||
These plugins are licensed under the terms of the GNU General Public License.
|
||||
You will find a copy of this license in the LICENSE file included in the source package.
|
||||
|
||||
## Support
|
||||
|
||||
You may create [GitHub issues](https://github.com/dnsmichi/manubulon-snmp)
|
||||
as well. I do have a lot of things on my plate so best is to send in a tested (!) patch at the same time.
|
||||
Join the [Icinga community channels](https://www.icinga.com/about/get-involved/) for questions.
|
||||
|
||||
If you want to help maintain this project, just contact
|
||||
me on [twitter](https://twitter.com/dnsmichi) and I'll
|
||||
happily grant commit access.
|
||||
|
||||
You may head over to [monitoring-portal.org community](http://www.monitoring-portal.org)
|
||||
for questions and feedback.
|
||||
## Requirements
|
||||
|
||||
The original support tracker is still located on [sourceforge](https://sourceforge.net/p/nagios-snmp/feature-requests/).
|
||||
* Perl in `/usr/bin/perl`
|
||||
* Perl modules
|
||||
[Net::SNMP](http://search.cpan.org/~dtown/Net-SNMP-v6.0.1/lib/Net/SNMP.pm) and
|
||||
[Getopt::Long](http://search.cpan.org/~jv/Getopt-Long-2.49.1/lib/Getopt/Long.pm)
|
||||
* `icinga` user able to write files in /tmp/ directory
|
||||
* SNMP v3 authentication: Perl modules
|
||||
[Crypt::DES](http://search.cpan.org/~dparis/Crypt-DES-2.07/DES.pm),
|
||||
[Crypt::Rijndael](http://search.cpan.org/~leont/Crypt-Rijndael-1.13/Rijndael.pm) and
|
||||
[Digest::HMAC](http://search.cpan.org/~gaas/Digest-HMAC-1.03/lib/Digest/HMAC.pm)
|
||||
|
||||
## Development
|
||||
## Installation
|
||||
|
||||
Fork this repository on Github and send in a PR.
|
||||
Detailed installation instructions can be found [here](doc/02-Installation.md).
|
||||
|
||||
## Configuration
|
||||
|
||||
Proceed [here](doc/03-Configuration.md) to get details on the configuration with Icinga 2, Icinga 1.x, etc.
|
||||
|
||||
## FAQ
|
||||
|
||||
|
||||
## Thanks
|
||||
|
||||
Patrick Proy for creating and maintaining the original plugins.
|
||||
|
||||
## Contributing
|
||||
|
||||
Fork this repository on GitHub and send in a PR.
|
||||
|
||||
There's a `.perltidyrc` file in the main repository tree. If you are uncertain about the coding style,
|
||||
create your patch and then run:
|
||||
|
||||
$ perltidy -b plugins/*.pl
|
||||
```
|
||||
$ perltidy -b plugins/*.pl
|
||||
```
|
||||
|
||||
This requires the `perltidy` module being installed.
|
||||
|
||||
|
|
15
debian/.gitlab-ci.yml
vendored
Normal file
15
debian/.gitlab-ci.yml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
include:
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
|
||||
|
||||
variables:
|
||||
RELEASE: 'unstable'
|
||||
SALSA_CI_DISABLE_APTLY: 0
|
||||
SALSA_CI_DISABLE_AUTOPKGTEST: 0
|
||||
SALSA_CI_DISABLE_BLHC: 0
|
||||
SALSA_CI_DISABLE_LINTIAN: 0
|
||||
SALSA_CI_DISABLE_PIUPARTS: 0
|
||||
SALSA_CI_DISABLE_REPROTEST: 0
|
||||
SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 0
|
||||
SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 0
|
||||
SALSA_CI_ENABLE_BUILD_PACKAGE_TWICE: 1
|
21
debian/NEWS
vendored
Normal file
21
debian/NEWS
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
nagios-snmp-plugins (1.1.1-8) unstable; urgency=low
|
||||
|
||||
The following plugins are using now '-p' to specify the port and '-P' the
|
||||
protocol:
|
||||
|
||||
- check_snmp_load
|
||||
- check_snmp_mem
|
||||
- check_snmp_process
|
||||
- check_snmp_storage
|
||||
|
||||
The port is specified with '-p' now and the protocol with '-P':
|
||||
|
||||
Network protocol to be used
|
||||
['udp/ipv4'] : UDP over IPv4
|
||||
'udp/ipv6' : UDP over IPv6
|
||||
'tcp/ipv4' : TCP over IPv4
|
||||
'tcp/ipv6' : TCP over IPv6
|
||||
|
||||
Network protocol (Default udp/ipv4)
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Sun, 02 Mar 2014 23:45:13 +0100
|
260
debian/README.Debian
vendored
Normal file
260
debian/README.Debian
vendored
Normal file
|
@ -0,0 +1,260 @@
|
|||
nagios-snmp-plugins for Debian
|
||||
------------------------------
|
||||
|
||||
If you are using snmp v1 and v2c, you can provide your community as last
|
||||
argument with your check_command. So you can specify different communities
|
||||
for different services. With snmp v3 you need to set $USER9$ like shown in
|
||||
the config snipsets in your resource.cfg or you need to modify your
|
||||
command definitions!
|
||||
|
||||
See http://www.manubulon.com/nagios/index_commands.html#snmplogin
|
||||
and http://www.manubulon.com/nagios/index_info.html#snmplogin
|
||||
|
||||
These snipsets are dumped from nagios-snmp-plugins website.
|
||||
Look at <http://www.manubulon.com/nagios/index_commands.html> and
|
||||
<http://www.manubulon.com/nagios/index_info.html> for more (actual) info!
|
||||
|
||||
Here are commands example to use the scripts with nagios.
|
||||
|
||||
All these commands use $USER<n>$ macros to put snmp login. You
|
||||
have to do this for these examples to work.
|
||||
The $USER<n>$ macro are defined in the resources.cfg file
|
||||
|
||||
If you are using snmp v1 :
|
||||
$USER7$=-C <community>
|
||||
|
||||
If you are using snmp v2c :
|
||||
$USER7$=-C <community> -2
|
||||
|
||||
Examples of snmp v3 login :
|
||||
AuthNoPriv (md5) :
|
||||
$USER8$=-l <login> -x <pass>
|
||||
|
||||
AuthPriv (md5,aes) :
|
||||
$USER8$=-l <login> -x <pass> -X <pass> -L md5,aes
|
||||
|
||||
About regular expressions
|
||||
|
||||
With all these scripts, when you select an interface, a service or process name
|
||||
etc... you use by default regular expressions :
|
||||
Note : you can disable this by using "-r"
|
||||
|
||||
Examples : Don't forget it is perl regular expressions.
|
||||
Regexp Will match
|
||||
eth eth0, eth1, eth2 but also Fastethernet0/0 ....
|
||||
eth[1-9] eth1, eth2, ... eth9 but also eth10, eth11
|
||||
eth[1-2]$ eth1, eth2 only (not eth11 for ex).
|
||||
dhcp dhcpc, dhpcd
|
||||
|
||||
* check_snmp_cpfw.pl
|
||||
|
||||
define command {
|
||||
command_name check_snmp_cpfw_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_cpfw.pl -H $HOSTADDRESS$ $USER8$
|
||||
$ARG1$
|
||||
}
|
||||
|
||||
define service {
|
||||
name checkpoint_verification
|
||||
check_command check_snmp_cpfw_v3!-swa -p Solsoft_Policy \
|
||||
-c 100000,200000 -f
|
||||
}
|
||||
|
||||
* check_snmp_load.pl
|
||||
|
||||
define command {
|
||||
command_name check_snmp_load_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_load.pl -H $HOSTADDRESS$ $USER7$ -T
|
||||
$ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
define command {
|
||||
command_name check_snmp_load_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_load.pl -H $HOSTADDRESS$ $USER8$ -T
|
||||
$ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
define service {
|
||||
name bluecoat_load
|
||||
check_command check_snmp_load_v1!bc!95!99
|
||||
}
|
||||
|
||||
define service {
|
||||
name Linux_load
|
||||
check_command check_snmp_load_v1!netsl!4,3,3!8,5,5
|
||||
}
|
||||
|
||||
define service {
|
||||
name Cisco_load
|
||||
check_command check_snmp_load_v1!cisco!90,80,60!100,100,100
|
||||
}
|
||||
|
||||
define service {
|
||||
name lp_load
|
||||
check_command check_snmp_load_v1!lp!90!99
|
||||
}
|
||||
|
||||
* check_snmp_interface.pl
|
||||
|
||||
define command {
|
||||
command_name check_snmp_int_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_int.pl -H $HOSTADDRESS$ $USER7$ -n
|
||||
$ARG1$ $ARG2$
|
||||
}
|
||||
|
||||
define command{
|
||||
command_name check_snmp_int_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_int.pl -H $HOSTADDRESS$ $USER8$ -n
|
||||
$ARG1$ $ARG2$
|
||||
}
|
||||
|
||||
define service {
|
||||
name check_int_1_6
|
||||
check_command check_snmp_int_v1!"FastEthernet-[1-6]"
|
||||
}
|
||||
|
||||
define service {
|
||||
name check_int_eth0_bdw
|
||||
check_command check_snmp_int_v3!eth0!-k -w 100,50 -c 0,0
|
||||
}
|
||||
|
||||
* check_snmp_mem.pl
|
||||
|
||||
define command {
|
||||
command_name check_snmp_mem_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_mem.pl -H $HOSTADDRESS$ $USER7$ $ARG1$
|
||||
-w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
define command {
|
||||
command_name check_snmp_mem_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_mem.pl -H $HOSTADDRESS$ $USER8$ $ARG1$
|
||||
-w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
define service {
|
||||
name Linux_memory
|
||||
check_command check_snmp_mem_v1!-N!95,60!99,90
|
||||
}
|
||||
|
||||
define service {
|
||||
name Cisco_mem
|
||||
check_command check_snmp_mem_v1!-I!80!99
|
||||
}
|
||||
|
||||
* check_snmp_process.pl
|
||||
|
||||
define command {
|
||||
command_name check_snmp_process_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_process.pl -H $HOSTADDRESS$ $USER7$ -n
|
||||
$ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
define service {
|
||||
name proxy_checks
|
||||
check_command check_snmp_process_v1!proxy!21,1999!20,2000!-2
|
||||
}
|
||||
|
||||
define service {
|
||||
name Check_httpd_all
|
||||
check_command check_snmp_process_v1!httpd!5,100!0!-2 -m 20,30 -u 90,99
|
||||
}
|
||||
|
||||
define service {
|
||||
name check_crontab
|
||||
service_description Check Crontab service
|
||||
check_command check_snmp_process!crond!0!0
|
||||
}
|
||||
|
||||
* check_snmp_storage.pl
|
||||
|
||||
define command {
|
||||
command_name check_snmp_storage_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_storage.pl -H $HOSTADDRESS$ $USER7$ -m
|
||||
$ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
define command {
|
||||
command_name check_snmp_storage_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_storage.pl -H $HOSTADDRESS$ $USER8$ -m
|
||||
$ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
define service {
|
||||
name Check_LinDisk_home
|
||||
service_description Check /home
|
||||
check_command check_snmp_storage_v3!/home!90!97!-r
|
||||
}
|
||||
|
||||
define service {
|
||||
name Win_check_swap
|
||||
service_description Check Windows swap
|
||||
check_command check_snmp_storage_v3!Virtual!60!90
|
||||
}
|
||||
|
||||
define service {
|
||||
name check_linux_swap
|
||||
service_description Check swap linux
|
||||
check_command check_snmp_storage_v1!Swap!60!90!
|
||||
}
|
||||
|
||||
define service {
|
||||
name check_disk_all
|
||||
service_description Check / /opt /var /config
|
||||
check_command check_snmp_storage_v1!"^/$|opt|config|var"!80!90!
|
||||
}
|
||||
|
||||
* check_snmp_vrrp.pl
|
||||
|
||||
define command {
|
||||
command_name check_snmp_vrrp_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_vrrp.pl -H $HOSTADDRESS$ $USER7$ -T
|
||||
$ARG1$ -s $ARG2$
|
||||
}
|
||||
|
||||
define command {
|
||||
command_name check_snmp_vrrp_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_vrrp.pl -H $HOSTADDRESS$ $USER8$ -T
|
||||
$ARG1$ -s $ARG2$
|
||||
}
|
||||
|
||||
define service {
|
||||
name Linkproof_check_vrrp_master
|
||||
service_description Check vrrp in master state
|
||||
check_command check_snmp_vrrp_v3!lp!master
|
||||
}
|
||||
|
||||
define service {
|
||||
name Linkproof_check_vrrp_backup
|
||||
service_description Check vrrp in backup state
|
||||
check_command check_snmp_vrrp_v3!lp!backup
|
||||
}
|
||||
|
||||
define service {
|
||||
name Nokia_clustering
|
||||
check_command check_snmp_vrrp_v3!ipso!2,98%
|
||||
}
|
||||
|
||||
* check_snmp_win.pl
|
||||
|
||||
define command {
|
||||
command_name check_win
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_win.pl -H $HOSTADDRESS$ $USER7$ -n
|
||||
$ARG2$
|
||||
# comment community service(s) name
|
||||
}
|
||||
|
||||
define service {
|
||||
name check_win_dhcp
|
||||
service_description Check dhcp service
|
||||
check_command check_win!dhcp
|
||||
register 0
|
||||
}
|
||||
|
||||
define service {
|
||||
name check_win_reg_spool
|
||||
service_description Verification acces au registre en spooleur
|
||||
check_command check_win!"au registre",spouleur
|
||||
register 0
|
||||
}
|
||||
-- Jan Wagner <waja@cyconet.org> Fri, 26 Jan 2007 16:32:47 +0100
|
3
debian/README.source
vendored
Normal file
3
debian/README.source
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
We use dpatch for patch handling inside our package(s). Please see
|
||||
/usr/share/doc/dpatch/README.source.gz (if you have installed dpatch) for
|
||||
documentation about dpatch.
|
188
debian/bin/github-release.sh
vendored
Executable file
188
debian/bin/github-release.sh
vendored
Executable file
|
@ -0,0 +1,188 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2014 Terry Burton
|
||||
#
|
||||
# https://github.com/terryburton/travis-github-release
|
||||
#
|
||||
# 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.
|
||||
|
||||
# This script provides a simple continuous deployment
|
||||
# solution that allows Travis CI to publish a new GitHub
|
||||
# release and upload assets to it whenever a tag is pushed:
|
||||
# git tag; git push --tags
|
||||
#
|
||||
# It is created as a temporary solution whilst we wait for
|
||||
# Travis DPL to support GitHub:
|
||||
#
|
||||
# https://github.com/travis-ci/dpl
|
||||
#
|
||||
# Place this script somewhere in your project repository (perhaps by forking
|
||||
# the github-travis-release repo and adding your fork as a git submodule) then
|
||||
# put something like this to your .travis.yml:
|
||||
#
|
||||
# after_success: .travis/github-release.sh "$TRAVIS_REPO_SLUG" "`head -1 src/VERSION`" build/release/*
|
||||
#
|
||||
# The first argument is your repository in the format
|
||||
# "username/repository", which Travis provides in the
|
||||
# TRAVIS_REPO_SLUG environment variable.
|
||||
#
|
||||
# The second argument is the release version which as a
|
||||
# sanity check should match the tag that you are releasing.
|
||||
# You could pass "`git describe`" to satisfy this check.
|
||||
#
|
||||
# The remaining arguments are a list of asset files that you
|
||||
# want to publish along with the release.
|
||||
#
|
||||
# The script requires that you create a GitHub OAuth access
|
||||
# token to facilitate the upload:
|
||||
#
|
||||
# https://help.github.com/articles/creating-an-access-token-for-command-line-use
|
||||
#
|
||||
# You must pass this securely in the GITHUBTOKEN environment
|
||||
# variable:
|
||||
#
|
||||
# http://docs.travis-ci.com/user/encryption-keys/
|
||||
#
|
||||
# For testing purposes you can create a local convenience
|
||||
# file in the script directory called GITHUBTOKEN that sets
|
||||
# the GITHUBTOKEN environment variable. If you do so you MUST
|
||||
# ensure that this doesn't get pushed to your repository,
|
||||
# perhaps by adding it to a .gitignore file.
|
||||
#
|
||||
# Should you get stuck then look at a working example. This
|
||||
# code is being used by Barcode Writer in Pure PostScript
|
||||
# for automated deployment:
|
||||
#
|
||||
# https://github.com/terryburton/postscriptbarcode
|
||||
|
||||
set -e
|
||||
|
||||
REPO=$1 && shift
|
||||
RELEASE=$1 && shift
|
||||
RELEASEFILES=$@
|
||||
|
||||
if ! TAG=`git describe --exact-match --tags 2>/dev/null`; then
|
||||
echo "This commit is not a tag so not creating a release"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS" = "true" ] && [ -z "$TRAVIS_TAG" ]; then
|
||||
echo "This build is not for the tag so not creating a release"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS" = "true" ] && [ "$TRAVIS_TAG" != "$RELEASE" ]; then
|
||||
echo "Error: TRAVIS_TAG ($TRAVIS_TAG) does not match the indicated release ($RELEASE)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$TAG" != "$RELEASE" ]; then
|
||||
echo "Error: The tag ($TAG) does not match the indicated release ($RELEASE)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$RELEASEFILES" ]]; then
|
||||
echo "Error: No release files provided"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SCRIPTDIR=`dirname $0`
|
||||
[ -e "$SCRIPTDIR/GITHUBTOKEN" ] && . "$SCRIPTDIR/GITHUBTOKEN"
|
||||
if [[ -z "$GITHUBTOKEN" ]]; then
|
||||
echo "Error: GITHUBTOKEN is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Creating GitHub release for $RELEASE"
|
||||
|
||||
echo -n "Create draft release... "
|
||||
JSON=$(cat <<EOF
|
||||
{
|
||||
"tag_name": "$TAG",
|
||||
"target_commitish": "master",
|
||||
"name": "$TAG: New release",
|
||||
"draft": true,
|
||||
"prerelease": false
|
||||
}
|
||||
EOF
|
||||
)
|
||||
RESULT=`curl -s -w "\n%{http_code}\n" \
|
||||
-H "Authorization: token $GITHUBTOKEN" \
|
||||
-d "$JSON" \
|
||||
"https://api.github.com/repos/$REPO/releases"`
|
||||
if [ "`echo "$RESULT" | tail -1`" != "201" ]; then
|
||||
echo FAILED
|
||||
echo "$RESULT"
|
||||
exit 1
|
||||
fi
|
||||
RELEASEID=`echo "$RESULT" | sed -ne 's/^ "id": \(.*\),$/\1/p'`
|
||||
if [[ -z "$RELEASEID" ]]; then
|
||||
echo FAILED
|
||||
echo "$RESULT"
|
||||
exit 1
|
||||
fi
|
||||
echo DONE
|
||||
|
||||
for FILE in $RELEASEFILES; do
|
||||
if [ ! -f $FILE ]; then
|
||||
echo "Warning: $FILE not a file"
|
||||
continue
|
||||
fi
|
||||
FILESIZE=`stat -c '%s' "$FILE"`
|
||||
FILENAME=`basename $FILE`
|
||||
echo -n "Uploading $FILENAME... "
|
||||
RESULT=`curl -s -w "\n%{http_code}\n" \
|
||||
-H "Authorization: token $GITHUBTOKEN" \
|
||||
-H "Accept: application/vnd.github.manifold-preview" \
|
||||
-H "Content-Type: application/zip" \
|
||||
--data-binary "@$FILE" \
|
||||
"https://uploads.github.com/repos/$REPO/releases/$RELEASEID/assets?name=$FILENAME&size=$FILESIZE"`
|
||||
if [ "`echo "$RESULT" | tail -1`" != "201" ]; then
|
||||
echo FAILED
|
||||
echo "$RESULT"
|
||||
exit 1
|
||||
fi
|
||||
echo DONE
|
||||
done
|
||||
|
||||
echo -n "Publishing release... "
|
||||
JSON=$(cat <<EOF
|
||||
{
|
||||
"draft": false
|
||||
}
|
||||
EOF
|
||||
)
|
||||
RESULT=`curl -s -w "\n%{http_code}\n" \
|
||||
-X PATCH \
|
||||
-H "Authorization: token $GITHUBTOKEN" \
|
||||
-d "$JSON" \
|
||||
"https://api.github.com/repos/$REPO/releases/$RELEASEID"`
|
||||
if [ "`echo "$RESULT" | tail -1`" = "200" ]; then
|
||||
echo DONE
|
||||
else
|
||||
echo FAILED
|
||||
echo "$RESULT"
|
||||
exit 1
|
||||
fi
|
282
debian/changelog
vendored
Normal file
282
debian/changelog
vendored
Normal file
|
@ -0,0 +1,282 @@
|
|||
nagios-snmp-plugins (2.1.0-4) UNRELEASED; urgency=medium
|
||||
|
||||
*
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Mon, 23 Jan 2023 14:23:45 +0000
|
||||
|
||||
nagios-snmp-plugins (2.1.0-3) unstable; urgency=medium
|
||||
|
||||
[ Jan Wagner ]
|
||||
* NOT RELEASED YET
|
||||
* [4ffef41] Adding Github CI
|
||||
* [071a540] Set upstream metadata fields: Bug-Database, Bug-Submit,
|
||||
Repository, Repository-Browse.
|
||||
* [56b1ad4] d/source/options: Adding .github to diff ignore
|
||||
* [731359e] d/source/options: Fixing github ignore
|
||||
|
||||
[ Bas Couwenberg ]
|
||||
* [9f8c997] Bump Standards-Version to 4.6.0, no changes.
|
||||
* [547ca5d] Update watch file to use tags instead of releases.
|
||||
* [0fef6a8] Bump Standards-Version to 4.6.1, no changes.
|
||||
|
||||
|
||||
[ Bas Couwenberg ]
|
||||
* [36ad122] Add Rules-Requires-Root to control file.
|
||||
|
||||
[ Jan Wagner ]
|
||||
* [465be3f] d/control: Drop 'pkg-' from Vcs-Headers
|
||||
|
||||
[ Debian Janitor ]
|
||||
* [8bb1998] Remove constraints unnecessary since buster (oldstable)
|
||||
* [16004b9] Remove constraints unnecessary since buster (oldstable)
|
||||
|
||||
[ Jan Wagner ]
|
||||
* [ea50f54] Bump debhelper from old 12 to 13.
|
||||
* [4f38dec] Update standards version to 4.6.2, no changes needed.
|
||||
* [a193b79] Adding d/p/19_check_snmp_int_remove_unneeded_my from upstream
|
||||
* [fdc0108] Adding d/p/20_check_snmp_int_avaid_huge_amount_of_regex from
|
||||
upstream
|
||||
* [d4bd9c9] Adding d/p/21_check_snmp_load_update_fortiswitch_and_fortigate4.3
|
||||
from upstream
|
||||
* [e2bdf2d] Adding d/p/22_check_snmp_storage_fix_space_btrfs from upstream
|
||||
(Closes: #959956)
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Mon, 23 Jan 2023 13:45:41 +0000
|
||||
|
||||
nagios-snmp-plugins (2.1.0-2) unstable; urgency=medium
|
||||
|
||||
[ Debian Janitor ]
|
||||
* Use secure copyright file specification URI.
|
||||
* debian/copyright: use spaces rather than tabs to start continuation
|
||||
lines.
|
||||
* Bump debhelper from deprecated 5 to 12. (Closes: #965745)
|
||||
* Set debhelper-compat version in Build-Depends.
|
||||
* Update standards version to 4.5.0, no changes needed.
|
||||
|
||||
[ Jan Wagner ]
|
||||
* [a75e780] Removing .travis.yml and adding .gitlab-ci.yml
|
||||
|
||||
[ Bas Couwenberg ]
|
||||
* [e989ff9] Bump watch file version to 4.
|
||||
* [b345ea5] Bump Standards-Version to 4.5.1, no changes.
|
||||
|
||||
[ Jan Wagner ]
|
||||
* [a815051] check_snmp_int.pl: added ign-admindown, ign-emptyalias options.
|
||||
fixed uninitialized variable warning by adding d/p/14_check_snmp_int_ign
|
||||
from upstream
|
||||
* [c1ffe3e] check_snmp_int.pl: Add spaces only if necessary by adding
|
||||
d/p/15_check_snmp_int_spaces from upstream
|
||||
* [ef233ba] check_snmp_win.pl: Add -o option (max message size) by adding
|
||||
d/p/16_check_snmp_win_max_message_size from upstream
|
||||
* [085ba7e] check_snmp_storage.pl: add support for allowing considering OK if
|
||||
no storage found matching given criteria by adding
|
||||
d/p/17_check_snmp_storage_okifempty from upstream
|
||||
* [84561d3] check_snmp_int.pl: fix perf_out not defined error by adding
|
||||
d/p/18_check_snmp_int_fix_perf_out
|
||||
* [45b2b11] d/control: Updating upstream to
|
||||
https://github.com/SteScho/manubulon-snmp
|
||||
* [f9bf220] d/watch: Updating upstream to
|
||||
https://github.com/SteScho/manubulon-snmp
|
||||
* [8f6cd11] Refreshing patches
|
||||
* [c1f1d25] d/copyright: Removing tabs
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Mon, 07 Dec 2020 15:50:39 +0100
|
||||
|
||||
nagios-snmp-plugins (2.1.0-1) unstable; urgency=medium
|
||||
|
||||
[ Jan Wagner ]
|
||||
* [75687e0] New upstream version 2.1.0
|
||||
* [181c319] Refresh patches
|
||||
* [568042e] d/rules: Adjust new documentation source path
|
||||
* [ea34bcb] d/patches/51_fix_privacy_doc: Remove more potential privacy
|
||||
breach
|
||||
* [117e400] d/control: Bump Standards-Version to 4.1.1, no changes needed
|
||||
* [f2e8ac9] d/docs: Fix location of the README
|
||||
* [c0535e4] Adding .travis-ci.yml
|
||||
* [019d443] d/control: Update VCS-headers
|
||||
|
||||
[ Bas Couwenberg ]
|
||||
* [c07faf2] Bump Standards-Version to 4.1.5, no changes.
|
||||
* [53cdb54] Bump Standards-Version to 4.2.0, no changes.
|
||||
* [70b7138] Bump Standards-Version to 4.2.1, no changes.
|
||||
* [3d095b1] Bump Standards-Version to 4.3.0, no changes.
|
||||
|
||||
[ Jan Wagner ]
|
||||
* [cb66729] Delete old unused patches
|
||||
* [bcc13b4] Adding d/p/10_check_snmp_storage_error_handling
|
||||
* [af07b7c] Adding d/p/11_check_snmp_int_agent_workaround
|
||||
* [890a780] Adding d/p/12_check_snmp_mem_perf
|
||||
* [f45e77a] Adding d/p/13_check_snmp_process_new_features
|
||||
* [cb17d7e] d/control: Updating Homepage-field to
|
||||
https://github.com/dnsmichi/manubulon-snmp
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 23 Jan 2019 20:44:01 +0100
|
||||
|
||||
nagios-snmp-plugins (2.0.0-1) unstable; urgency=medium
|
||||
|
||||
[ Bas Couwenberg ]
|
||||
* [caf8f93] d/control: Update Vcs-* URLs to use HTTPS, use cgit instead of
|
||||
gitweb for Vcs-Browser URL.
|
||||
|
||||
[ Jan Wagner ]
|
||||
* [1eca1c0] travis-ci: Make use of travis.d.n
|
||||
* [9c06100] New upstream version 2.0.0
|
||||
* [c431132] d/watch: Update for new upstream URL
|
||||
* [74388b3] Disable patches integrated in new upstream
|
||||
* [6f3bacd] Refresh remaining patches
|
||||
* [692a27a] d/rules: Adjusting src paths
|
||||
* [3590951] d/rules: Stop shipping outdated upstream changelog
|
||||
* [ceff8a0] d/docs: Adjusting src path
|
||||
* [80b3d1e] d/README.Debian: Spellfix
|
||||
* [d014d9b] d/rules: Fix installation location
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Thu, 08 Dec 2016 09:49:39 +0100
|
||||
|
||||
nagios-snmp-plugins (1.1.1-12) unstable; urgency=medium
|
||||
|
||||
* [24809b6] travis-ci: don't install build-deps manual
|
||||
* [07c8662] travis-ci: build package with dpkg-buildpackage
|
||||
* [82261f2] travis-ci: Initial support for uploading releases to github
|
||||
* [94da9a0] Merging upstream changes of github-release.sh
|
||||
* [76f4f9b] Updating copyright and author of debian/bin/github-release.sh
|
||||
* [9157b9d] Add n5k support to check_snmp_load via
|
||||
19_check_snmp_load_n5k patch
|
||||
* [f4871c4] Refreshing patches/01_update_pre_1.1.2
|
||||
* [4a57e8b] Refreshing patches/51_fix_privacy_doc
|
||||
* [e4c5a52] Adding 20_check_snmp_load_multiple_cpus
|
||||
* [434d3d0] Fixing paths in 20_check_snmp_load_multiple_cpus
|
||||
* [a31b428] Fixing 20_check_snmp_load_multiple_cpus
|
||||
* [672a475] debian/control: reformating with warp-and-sort
|
||||
* [bcecc23] travis-ci: grab actual used upstream version
|
||||
* [a8f8669] Adding patchtes/21_check_snmp_load_abstract_snmp_version_check
|
||||
* [f4e3f51] Adding patches/22_remove_utils_pm
|
||||
* [8dd4f10] Adding patches/23_check_snmp_load_drop_debugging
|
||||
* [96dcc51] travis-ci: Adding required arguments for trusty
|
||||
* [6cbfcfa] travis-ci: automatically install dependencies
|
||||
* [c5e9ec0] check_snmp_int: Add patches/24_check_snmp_int_use_ifname
|
||||
(Closes: #812837)
|
||||
* [d8d6d1b] d/rules: Use dh_prep instead of 'dh_clean -k'
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 27 Jan 2016 16:23:36 +0100
|
||||
|
||||
nagios-snmp-plugins (1.1.1-11) unstable; urgency=medium
|
||||
|
||||
* [dd7632d] Create /etc/nagios-plugins/config/ (Closes: #767681)
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Sun, 02 Nov 2014 20:45:10 +0100
|
||||
|
||||
nagios-snmp-plugins (1.1.1-10) unstable; urgency=medium
|
||||
|
||||
* [5dbb905] Add support for monitoring-plugins
|
||||
* [f529116] Add 'libcrypt-des-perl, libcrypt-rijndael-perl' as recommends,
|
||||
needed for snmp v3
|
||||
* [ce65e19] Don't use symlinked license in debian/copyright
|
||||
* [20f7a79] Bump Standards-Version to 3.9.6, no changes needed
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Sun, 12 Oct 2014 22:23:51 +0200
|
||||
|
||||
nagios-snmp-plugins (1.1.1-9) unstable; urgency=low
|
||||
|
||||
* [976e307] Update Vcs-headers
|
||||
* [950a63f] Use full binary path instead of $ macro in command definitions
|
||||
* [3acf202] check_snmp_storage: Add 64bit support
|
||||
* [73c21a0] Convert the package to source format 3.0 (quilt)
|
||||
* [6adaea0] Fix 15_check_snmp_storage_64bit
|
||||
* [074ed96] Add travis-ci config
|
||||
* [36857aa] travis-ci: Reorder and comment .travis.yml
|
||||
* [9ac5f8c] update git ignore regex
|
||||
* [f82ac54] travis-ci: Add lintian checks after build
|
||||
* [1ea9877] Add build-indep and build-arch target into debian/rules
|
||||
* [36735a8] Update to recent copyright format
|
||||
* [8a119de] Updating standards version to 3.9.5, no changes needed
|
||||
* [aaa7106] Set set -e in the body in body of the maintainers scripts
|
||||
* [d03e055] Extend the extended package description
|
||||
* [2fcaf9a] Fix potential privacy breach of HTML documentation
|
||||
* [1ae942a] Add upstream changelog into package
|
||||
* [ab802e4] Merge latest CVS patches into one
|
||||
* [34070bf] Add missing latest CVS patches
|
||||
* [76a78cb] Refresh patchtes
|
||||
* [6fa6c28] Update patch description 10_fix_net_snmp_version
|
||||
* [0193501] Rename patch 11_fix_privacy_doc into 51_fix_privacy_doc
|
||||
* [c7fb3c5] Update patch descriptions
|
||||
* [4623399] Add 16_perfdata to enable perfdate
|
||||
* [93834c1] Add 17_protocol_fam to support protocol and IP familiy
|
||||
* [8ca89ae] Add NEWS file for changed behavior of specifying port
|
||||
* [f05ed7f] Add 18_check_snmp_process_tmp_file
|
||||
* [e3e176d] travis-ci: Install recent lintian version
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 05 Mar 2014 22:34:26 +0100
|
||||
|
||||
nagios-snmp-plugins (1.1.1-8) unstable; urgency=low
|
||||
|
||||
* Add 10_fix_net_snmp_version.dpatch
|
||||
- Fixing Net::SNMP version (Closes: #699413)
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Thu, 31 Jan 2013 08:56:00 +0100
|
||||
|
||||
nagios-snmp-plugins (1.1.1-7) unstable; urgency=low
|
||||
|
||||
* Add "Copyright" to all copyrights in debian/copyright
|
||||
* Updating standards version to 3.8.4
|
||||
- Add README.source
|
||||
* Add 1.0 to debian/source/format
|
||||
* Add trailing trunk/ at Vcs-Svn-field
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 10 Mar 2010 10:18:35 +0100
|
||||
|
||||
nagios-snmp-plugins (1.1.1-6) unstable; urgency=low
|
||||
|
||||
* instead of suggest depend on nagios-plugins-basic to get command
|
||||
definitions installed into /etc/nagios-plugins/config and registered via
|
||||
ucf, since /usr/share/nagios-plugins/dpkg/functions is used in postinst
|
||||
(Closes: #513872)
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Sun, 01 Feb 2009 23:49:10 +0100
|
||||
|
||||
nagios-snmp-plugins (1.1.1-5) unstable; urgency=low
|
||||
|
||||
* implement machine-interpretable copyright file
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Sun, 20 Jul 2008 13:17:39 +0200
|
||||
|
||||
nagios-snmp-plugins (1.1.1-4) unstable; urgency=low
|
||||
|
||||
* adjust copyright, it's GPL2 (and not later)
|
||||
* update some scripts to newest available version from website
|
||||
* rename 02_disable_epn.dpatch to 50_disable_epn.dpatch to be the last one
|
||||
(Closes: #484462)
|
||||
* Updating standards version to 3.8.0, no changes needed
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Mon, 07 Jul 2008 22:08:37 +0200
|
||||
|
||||
nagios-snmp-plugins (1.1.1-3) unstable; urgency=low
|
||||
|
||||
* change unit to bit/s in interface check
|
||||
* add option for scale of bandwidth to interface check
|
||||
* added Vcs- fields, moved Homepage into source header's field
|
||||
* bump standards version to 3.7.3 (no changes needed)
|
||||
* add 02_disable_epn.dpatch to disable epn, since the plugins don't
|
||||
work with it
|
||||
* bump copyright of packaging to 2008
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Mon, 14 Apr 2008 23:20:52 +0200
|
||||
|
||||
nagios-snmp-plugins (1.1.1-2) unstable; urgency=low
|
||||
|
||||
* make use of dpatch infrastructure
|
||||
* include a fix for check_snmp_env.pl from cvs
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Fri, 6 Jul 2007 22:22:02 +0200
|
||||
|
||||
nagios-snmp-plugins (1.1.1-1) unstable; urgency=low
|
||||
|
||||
* new upstream
|
||||
* include (new) html docs into package
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 25 Apr 2007 22:00:50 +0200
|
||||
|
||||
nagios-snmp-plugins (1.1-1) unstable; urgency=low
|
||||
|
||||
* Initial release (Closes: #401678).
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Mon, 15 Jan 2007 20:34:19 +0100
|
29
debian/control
vendored
Normal file
29
debian/control
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
Source: nagios-snmp-plugins
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Debian Nagios Maintainer Group <pkg-nagios-devel@lists.alioth.debian.org>
|
||||
Uploaders: Jan Wagner <waja@cyconet.org>
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
Standards-Version: 4.6.2
|
||||
Vcs-Browser: https://salsa.debian.org/nagios-team/nagios-snmp-plugins
|
||||
Vcs-Git: https://salsa.debian.org/nagios-team/nagios-snmp-plugins.git
|
||||
Homepage: https://github.com/SteScho/manubulon-snmp
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: nagios-snmp-plugins
|
||||
Architecture: all
|
||||
Depends: libnet-snmp-perl,
|
||||
monitoring-plugins-common | nagios-plugins-basic (>= 1.4.5-2),
|
||||
ucf,
|
||||
${misc:Depends},
|
||||
${perl:Depends}
|
||||
Recommends: libcrypt-des-perl, libcrypt-rijndael-perl
|
||||
Description: SNMP Plugins for nagios
|
||||
A set of Nagios plugins to check hosts/devices using snmp protocol
|
||||
.
|
||||
The general idea of these scripts is to check as many things as possible with
|
||||
snmp (how do you install NRPE on Cisco or AS/400 ?) : disks, memory, load,
|
||||
interface, running procsses, etc...
|
||||
.
|
||||
The other idea is to select disks, interfaces, process using regular
|
||||
expressions
|
68
debian/copyright
vendored
Normal file
68
debian/copyright
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: Nagios SNMP Plugins
|
||||
Upstream-Contact: Patrick Proy (nagios at proy.org)
|
||||
Source: http://www.manubulon.com/nagios
|
||||
|
||||
Files: *
|
||||
Copyright: Copyright (C) 2004-2007 Patrick Proy (nagios at proy.org)
|
||||
License: GPL-2
|
||||
|
||||
Files: debian/*
|
||||
Copyright: Copyright (C) 2006, 2008 Jan Wagner <waja@cyconet.org>
|
||||
License: GPL-2+
|
||||
|
||||
Files: debian/bin/github-release.sh
|
||||
Copyright: Copyright (c) 2014 Terry Burton
|
||||
License: Expat
|
||||
|
||||
License: Expat
|
||||
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.
|
||||
|
||||
License: GPL-2
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
published by the Free Software Foundation.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public License version
|
||||
2 can be found in /usr/share/common-licenses/GPL-2 file.
|
1
debian/dirs
vendored
Normal file
1
debian/dirs
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
etc/nagios-plugins/config
|
1
debian/docs
vendored
Normal file
1
debian/docs
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
README.md
|
42
debian/patches/10_check_snmp_storage_error_handling
vendored
Normal file
42
debian/patches/10_check_snmp_storage_error_handling
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
From e7472bfb2a39f3536350642b177e5f9e17c5c369 Mon Sep 17 00:00:00 2001
|
||||
From: Louis Sautier <sautier.louis@gmail.com>
|
||||
Date: Mon, 29 Jan 2018 09:17:25 +0100
|
||||
Subject: [PATCH] check_snmp_storage: fix SNMP error handling, see #33
|
||||
|
||||
---
|
||||
plugins/check_snmp_storage.pl | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/plugins/check_snmp_storage.pl b/plugins/check_snmp_storage.pl
|
||||
index 2325acc..3593f79 100755
|
||||
--- a/plugins/check_snmp_storage.pl
|
||||
+++ b/plugins/check_snmp_storage.pl
|
||||
@@ -598,6 +598,15 @@ sub check_options {
|
||||
$result = $session->get_request(@oids);
|
||||
} else {
|
||||
$result = $session->get_request(Varbindlist => \@oids);
|
||||
+}
|
||||
+
|
||||
+if (!defined($result)) {
|
||||
+ printf("ERROR getting OIDs: %s.\n", $session->error);
|
||||
+ $session->close;
|
||||
+ exit $ERRORS{"UNKNOWN"};
|
||||
+}
|
||||
+
|
||||
+if (version->parse(Net::SNMP->VERSION) >= 4) {
|
||||
foreach my $key (sort keys %$result) {
|
||||
|
||||
# Fix for filesystems larger 2 TB. More than 2 TB will cause an error because
|
||||
@@ -613,12 +622,6 @@ sub check_options {
|
||||
}
|
||||
}
|
||||
|
||||
-if (!defined($result)) {
|
||||
- printf("ERROR: Size table :%s.\n", $session->error);
|
||||
- $session->close;
|
||||
- exit $ERRORS{"UNKNOWN"};
|
||||
-}
|
||||
-
|
||||
$session->close;
|
||||
|
||||
# Only a few ms left...
|
83
debian/patches/11_check_snmp_int_agent_workaround
vendored
Normal file
83
debian/patches/11_check_snmp_int_agent_workaround
vendored
Normal file
|
@ -0,0 +1,83 @@
|
|||
From ed1da1396f3ca3337a4ebe3f0cf610a30e6c5775 Mon Sep 17 00:00:00 2001
|
||||
From: Jochen Friedrich <j.friedrich@nwe.de>
|
||||
Date: Wed, 14 Mar 2018 15:31:00 +0100
|
||||
Subject: [PATCH] Workaround for buggy SNMP agents not removing deleted
|
||||
interfaces.
|
||||
|
||||
If exact match is requested, only use the interface with the highest index.
|
||||
Some buggy SNMP agents forget to delete interfaces which are gone (like ppp
|
||||
or tunnel interfaces).
|
||||
---
|
||||
plugins/check_snmp_int.pl | 57 ++++++++++++++++++++-------------------
|
||||
1 file changed, 30 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/plugins/check_snmp_int.pl b/plugins/check_snmp_int.pl
|
||||
index 9d4a2a5..e938131 100755
|
||||
--- a/plugins/check_snmp_int.pl
|
||||
+++ b/plugins/check_snmp_int.pl
|
||||
@@ -632,35 +632,38 @@ sub check_options {
|
||||
|
||||
# get the index number of the interface
|
||||
my @oid_list = split(/\./, $key);
|
||||
- $tindex[$num_int] = pop(@oid_list);
|
||||
-
|
||||
- # get the full description
|
||||
- $descr[$num_int] = $$resultat{$key};
|
||||
-
|
||||
- # Get rid of special caracters (specially for Windows)
|
||||
- $descr[$num_int] =~ s/[[:cntrl:]]//g;
|
||||
-
|
||||
- # put the admin or oper oid in an array
|
||||
- $oids[$num_int]
|
||||
- = defined($o_admin)
|
||||
- ? $admin_table . $tindex[$num_int]
|
||||
- : $oper_table . $tindex[$num_int];
|
||||
-
|
||||
- # Put the performance oid
|
||||
- if (defined($o_perf) || defined($o_checkperf)) {
|
||||
- $oid_perf_inoct[$num_int] = $in_octet_table . $tindex[$num_int];
|
||||
- $oid_perf_outoct[$num_int] = $out_octet_table . $tindex[$num_int];
|
||||
- $oid_speed[$num_int] = $speed_table . $tindex[$num_int];
|
||||
- $oid_speed_high[$num_int] = $speed_table_64 . $tindex[$num_int];
|
||||
- if (defined($o_ext_checkperf) || defined($o_perfe)) {
|
||||
- $oid_perf_indisc[$num_int] = $in_discard_table . $tindex[$num_int];
|
||||
- $oid_perf_outdisc[$num_int] = $out_discard_table . $tindex[$num_int];
|
||||
- $oid_perf_inerr[$num_int] = $in_error_table . $tindex[$num_int];
|
||||
- $oid_perf_outerr[$num_int] = $out_error_table . $tindex[$num_int];
|
||||
+ my $int_index = pop(@oid_list);
|
||||
+ if (defined($o_noreg) && ($num_int > 0)) {
|
||||
+ if ($tindex[$num_int-1] < $int_index) {
|
||||
+ $num_int = 0;
|
||||
}
|
||||
}
|
||||
- verb("Name : $descr[$num_int], Index : $tindex[$num_int]");
|
||||
- $num_int++;
|
||||
+ if (!defined($o_noreg) || ($num_int == 0)) {
|
||||
+ $tindex[$num_int] = $int_index;
|
||||
+ # get the full description
|
||||
+ $descr[$num_int]=$$resultat{$key};
|
||||
+ # Get rid of special caracters (specially for Windows)
|
||||
+ $descr[$num_int] =~ s/[[:cntrl:]]//g;
|
||||
+ # put the admin or oper oid in an array
|
||||
+ $oids[$num_int]= defined ($o_admin) ? $admin_table . $tindex[$num_int]
|
||||
+ : $oper_table . $tindex[$num_int];
|
||||
+
|
||||
+ # Put the performance oid
|
||||
+ if (defined($o_perf) || defined($o_checkperf)) {
|
||||
+ $oid_perf_inoct[$num_int]= $in_octet_table . $tindex[$num_int];
|
||||
+ $oid_perf_outoct[$num_int]= $out_octet_table . $tindex[$num_int];
|
||||
+ $oid_speed[$num_int]=$speed_table . $tindex[$num_int];
|
||||
+ $oid_speed_high[$num_int]=$speed_table_64 . $tindex[$num_int];
|
||||
+ if (defined($o_ext_checkperf) || defined($o_perfe)) {
|
||||
+ $oid_perf_indisc[$num_int]= $in_discard_table . $tindex[$num_int];
|
||||
+ $oid_perf_outdisc[$num_int]= $out_discard_table . $tindex[$num_int];
|
||||
+ $oid_perf_inerr[$num_int]= $in_error_table . $tindex[$num_int];
|
||||
+ $oid_perf_outerr[$num_int]= $out_error_table . $tindex[$num_int];
|
||||
+ }
|
||||
+ }
|
||||
+ verb("Name : $descr[$num_int], Index : $tindex[$num_int]");
|
||||
+ $num_int++;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
85
debian/patches/12_check_snmp_mem_perf
vendored
Normal file
85
debian/patches/12_check_snmp_mem_perf
vendored
Normal file
|
@ -0,0 +1,85 @@
|
|||
From 8855b778e5a4aa53667baaad3863112fd93aee64 Mon Sep 17 00:00:00 2001
|
||||
From: jimbobmcgee <jimbobmcgee@users.noreply.github.com>
|
||||
Date: Tue, 20 Mar 2018 23:22:09 +0000
|
||||
Subject: [PATCH] Better support for buffered/cached memory in Linux
|
||||
|
||||
Exclude buffered memory from perfdata output, if `-b` option is specified
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
Status output show RAM usage as percentage, while perfdata output shows total literal ram usage. If `-N -m` options are given, cached memory is included in both the plugin status output and the perfdata. If `-N -b` options are given, buffered memory is *excluded* from the status output, but remains *included* in the perfdata.
|
||||
|
||||
This patch alters the behaviour of the `-N -b` option combination so that, if supplied, buffered memory is also excluded from the perfdata.
|
||||
|
||||
|
||||
Add separate perfdata counters for cached and buffered memory, if `-ff` options is specified
|
||||
---------------------------------------------------------------------------------------------
|
||||
|
||||
Changed `Getopt` behaviour for `-f` so it can be specified more than once. If it is specified twice, perfdata is extended to include buffered and cached memory readings as separate perfdata values, e.g. `ram_used=12345 buffered=1234 cached=1234`. If using `-ff`, neither buffered nor cached memory are included in the perfdata value for RAM used.
|
||||
---
|
||||
plugins/check_snmp_mem.pl | 24 +++++++++++++-----------
|
||||
1 file changed, 13 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/plugins/check_snmp_mem.pl b/plugins/check_snmp_mem.pl
|
||||
index 2ac7ec9..3f93a20 100755
|
||||
--- a/plugins/check_snmp_mem.pl
|
||||
+++ b/plugins/check_snmp_mem.pl
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
sub print_usage {
|
||||
print
|
||||
-"Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -w <warn level> -c <crit level> [-I|-N|-E] [-f] [-m -b] [-t <timeout>] [-V]\n";
|
||||
+"Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -w <warn level> -c <crit level> [-I|-N|-E] [-f[f]] [-m -b] [-t <timeout>] [-V]\n";
|
||||
}
|
||||
|
||||
sub isnnum { # Return true if arg is not a number
|
||||
@@ -218,8 +218,8 @@ sub check_options {
|
||||
'memcache' => \$o_cache,
|
||||
'b' => \$o_buffer,
|
||||
'membuffer' => \$o_buffer,
|
||||
- 'f' => \$o_perf,
|
||||
- 'perfdata' => \$o_perf
|
||||
+ 'f+' => \$o_perf,
|
||||
+ 'perfdata+' => \$o_perf
|
||||
);
|
||||
if (defined($o_help)) { help(); exit $ERRORS{"UNKNOWN"} }
|
||||
if (defined($o_version)) { p_version(); exit $ERRORS{"UNKNOWN"} }
|
||||
@@ -578,9 +578,7 @@ sub check_options {
|
||||
|
||||
$realused = ($$resultat{$nets_ram_total} - ($$resultat{$nets_ram_free} + $totalcachedbuffered))
|
||||
/ $$resultat{$nets_ram_total};
|
||||
-
|
||||
if ($$resultat{$nets_ram_total} == 0) { $realused = 0; }
|
||||
-
|
||||
$swapused
|
||||
= ($$resultat{$nets_swap_total} == 0)
|
||||
? 0
|
||||
@@ -605,12 +603,11 @@ sub check_options {
|
||||
}
|
||||
$n_output .= " ; " . $n_status;
|
||||
if (defined($o_perf)) {
|
||||
- if (defined($o_cache)) {
|
||||
- $n_output .= " | ram_used=" . ($$resultat{$nets_ram_total} - $$resultat{$nets_ram_free}) . ";";
|
||||
- } else {
|
||||
- $n_output .= " | ram_used="
|
||||
- . ($$resultat{$nets_ram_total} - $$resultat{$nets_ram_free} - $$resultat{$nets_ram_cache}) . ";";
|
||||
- }
|
||||
+ my $perf_ramused = ($$resultat{$nets_ram_total} - $$resultat{$nets_ram_free});
|
||||
+ $perf_ramused -= $$resultat{$nets_ram_cache} if $o_perf > 1 or !defined($o_cache);
|
||||
+ $perf_ramused -= $$resultat{$nets_ram_buffer} if $o_perf > 1 or defined($o_buffer);
|
||||
+
|
||||
+ $n_output .= " | ram_used=$perf_ramused;";
|
||||
$n_output .= ($o_warnR == 0) ? ";" : round($o_warnR * $$resultat{$nets_ram_total} / 100, 0) . ";";
|
||||
$n_output .= ($o_critR == 0) ? ";" : round($o_critR * $$resultat{$nets_ram_total} / 100, 0) . ";";
|
||||
$n_output .= "0;" . $$resultat{$nets_ram_total} . " ";
|
||||
@@ -618,6 +615,11 @@ sub check_options {
|
||||
$n_output .= ($o_warnS == 0) ? ";" : round($o_warnS * $$resultat{$nets_swap_total} / 100, 0) . ";";
|
||||
$n_output .= ($o_critS == 0) ? ";" : round($o_critS * $$resultat{$nets_swap_total} / 100, 0) . ";";
|
||||
$n_output .= "0;" . $$resultat{$nets_swap_total};
|
||||
+
|
||||
+ if ($o_perf > 1) {
|
||||
+ $n_output .= " buffered=" . $$resultat{$nets_ram_buffer} . ';;;0;' . $$resultat{$nets_ram_total};
|
||||
+ $n_output .= " cached=" . $$resultat{$nets_ram_cache} . ';;;0;' . $$resultat{$nets_ram_total};
|
||||
+ }
|
||||
}
|
||||
$session->close;
|
||||
print "$n_output \n";
|
348
debian/patches/13_check_snmp_process_new_features
vendored
Normal file
348
debian/patches/13_check_snmp_process_new_features
vendored
Normal file
|
@ -0,0 +1,348 @@
|
|||
From 9ceabfc974d4d9bfd0731bbedfa12a035a662466 Mon Sep 17 00:00:00 2001
|
||||
From: jimbobmcgee <jimbobmcgee@users.noreply.github.com>
|
||||
Date: Tue, 20 Mar 2018 23:28:12 +0000
|
||||
Subject: [PATCH] Minor feature updates to check_snmp_process.pl
|
||||
|
||||
The following features are included:
|
||||
1. Added new `-T` option, to report/check against the total RAM of all matched processes, rather than the highest value
|
||||
2. Warn/Crit values are now optional for `-m` and `-u` options, allowing for capture of these in perfdata without requiring thresholds
|
||||
3. Perfdata is now always written if `-F` is supplied, even if there were no matched process (i.e. `num_process=0 memory_usage=0 cpu_usage=0`).
|
||||
---
|
||||
plugins/check_snmp_process.pl | 201 +++++++++++++++++++++-------------
|
||||
1 file changed, 125 insertions(+), 76 deletions(-)
|
||||
|
||||
diff --git a/plugins/check_snmp_process.pl b/plugins/check_snmp_process.pl
|
||||
index 49a8cd7..2d2f72e 100755
|
||||
--- a/plugins/check_snmp_process.pl
|
||||
+++ b/plugins/check_snmp_process.pl
|
||||
@@ -44,9 +44,9 @@
|
||||
my $o_domain = 'udp/ipv4'; # Default to UDP over IPv4
|
||||
my $o_version2 = undef; #use snmp v2c
|
||||
my $o_descr = undef; # description filter
|
||||
-my $o_warn = 0; # warning limit
|
||||
+my $o_warn = undef; # warning limit
|
||||
my @o_warnL = undef; # warning limits (min,max)
|
||||
-my $o_crit = 0; # critical limit
|
||||
+my $o_crit = undef; # critical limit
|
||||
my @o_critL = undef; # critical limits (min,max)
|
||||
my $o_help = undef; # wan't some help ?
|
||||
my $o_verb = undef; # verbose mode
|
||||
@@ -74,17 +74,22 @@
|
||||
my $o_mem = undef; # checks memory (max)
|
||||
my @o_memL = undef; # warn and crit level for mem
|
||||
my $o_mem_avg = undef; # cheks memory average
|
||||
+my $o_mem_sum = undef; # checks memory total
|
||||
my $o_cpu = undef; # checks CPU usage
|
||||
my @o_cpuL = undef; # warn and crit level for cpu
|
||||
-my $o_delta = $delta_of_time_to_make_average; # delta time for CPU check
|
||||
+my $o_delta = undef; # delta time for CPU check
|
||||
|
||||
# functions
|
||||
|
||||
sub p_version { print "check_snmp_process version : $VERSION\n"; }
|
||||
|
||||
sub print_usage {
|
||||
- print
|
||||
-"Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd) [-p <port>] [-P <IP Protocol>] -n <name> [-w <min_proc>[,<max_proc>] -c <min_proc>[,max_proc] ] [-m<warn Mb>,<crit Mb> -a -u<warn %>,<crit%> -d<delta> ] [-t <timeout>] [-o <octet_length>] [-f -A -F ] [-r] [-V] [-g]\n";
|
||||
+ print "Usage: $0 [-v] -H <host> [-p <port>] [-P <IP Protocol>] "
|
||||
+ . "((-C <snmp_community> [-2]) | (-l login -x passwd)) "
|
||||
+ . "-n <name> [-f] [-A] [-r] [-w <min_proc>[,<max_proc>] -c <min_proc>[,<max_proc>]] "
|
||||
+ . "[-m [<warnMB>,<critMB>] [-a|-T]] "
|
||||
+ . "[-u [<warn%>,<crit%>] -d<delta>] "
|
||||
+ . "[-t <timeout>] [-o <octet_length>] [-F] [-V] [-g]\n";
|
||||
}
|
||||
|
||||
sub isnotnum { # Return true if arg is not a number
|
||||
@@ -186,7 +191,7 @@ sub help {
|
||||
ex : "named.*-t /var/named/chroot" will only select named process with this parameter
|
||||
-F, --perfout
|
||||
Add performance output
|
||||
- outputs : memory_usage, num_process, cpu_usage
|
||||
+ outputs: num_processes, memory_usage (if -m), cpu_usage (if -u)
|
||||
-w, --warn=MIN[,MAX]
|
||||
Number of process that will cause a warning
|
||||
-1 for no warning, MAX must be >0. Ex : -w-1,50
|
||||
@@ -197,15 +202,21 @@ sub help {
|
||||
with the following options : -w m1,x1 -c m2,x2
|
||||
you must have : m2 <= m1 < x1 <= x2
|
||||
you can omit x1 or x2 or both
|
||||
--m, --memory=WARN,CRIT
|
||||
+-m, --memory[=WARN,CRIT]
|
||||
checks memory usage (default max of all process)
|
||||
- values are warning and critical values in Mb
|
||||
+ WARN,CRIT values are warning and critical values in MB
|
||||
+ if WARN,CRIT values are not given, just report
|
||||
-a, --average
|
||||
makes an average of memory used by process instead of max
|
||||
--u, --cpu=WARN,CRIT
|
||||
+ (implies -m, cannot be used with -T)
|
||||
+-T, --total
|
||||
+ checks the total memory used by processes instead of max
|
||||
+ (implies -m, cannot be used with -a)
|
||||
+-u, --cpu[=WARN,CRIT]
|
||||
checks cpu usage of all process
|
||||
values are warning and critical values in % of CPU usage
|
||||
if more than one CPU, value can be > 100% : 100%=1 CPU
|
||||
+ if WARN,CRIT values are not given, just report
|
||||
-d, --delta=seconds
|
||||
make an average of <delta> seconds for CPU (default 300=5min)
|
||||
-g, --getall
|
||||
@@ -272,6 +283,8 @@ sub check_options {
|
||||
'memory:s' => \$o_mem,
|
||||
'a' => \$o_mem_avg,
|
||||
'average' => \$o_mem_avg,
|
||||
+ 'T' => \$o_mem_sum,
|
||||
+ 'total' => \$o_mem_sum,
|
||||
'u:s' => \$o_cpu,
|
||||
'cpu' => \$o_cpu,
|
||||
'2' => \$o_version2,
|
||||
@@ -327,9 +340,11 @@ sub check_options {
|
||||
|
||||
# Check compulsory attributes
|
||||
if (!defined($o_descr) || !defined($o_host)) { print_usage(); exit $ERRORS{"UNKNOWN"} }
|
||||
- @o_warnL = split(/,/, $o_warn);
|
||||
- @o_critL = split(/,/, $o_crit);
|
||||
- verb("$o_warn $o_crit $#o_warnL $#o_critL");
|
||||
+
|
||||
+ # Check warn/crit values
|
||||
+ @o_warnL = split(/,/, ($o_warn // "0"));
|
||||
+ @o_critL = split(/,/, ($o_crit // "0"));
|
||||
+ verb("Warn: " . ($o_warn // "undef") . "; Crit: " . ($o_crit // "undef") . "; #Warn: " . $#o_warnL . "; #Crit: " . $#o_critL);
|
||||
if (isnotnum($o_warnL[0]) || isnotnum($o_critL[0])) {
|
||||
print "Numerical values for warning and critical\n";
|
||||
print_usage();
|
||||
@@ -348,7 +363,6 @@ sub check_options {
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
- # Check min_crit < min warn < max warn < crit warn
|
||||
if ($o_warnL[0] < $o_critL[0]) {
|
||||
print " warn minimum must be >= crit minimum\n";
|
||||
print_usage();
|
||||
@@ -371,7 +385,15 @@ sub check_options {
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
#### Memory checks
|
||||
- if (defined($o_mem)) {
|
||||
+ if (defined($o_mem_sum) && defined($o_mem_avg)) {
|
||||
+ print "cannot test memory average and memory total\n";
|
||||
+ print_usage();
|
||||
+ exit $ERRORS{"UNKNOWN"};
|
||||
+ }
|
||||
+ if (defined($o_mem_sum) || defined($o_mem_avg)) {
|
||||
+ $o_mem = $o_mem // "";
|
||||
+ }
|
||||
+ if (defined($o_mem) && length($o_mem)) {
|
||||
@o_memL = split(/,/, $o_mem);
|
||||
if ($#o_memL != 1) { print "2 values (warning,critical) for memory\n"; print_usage(); exit $ERRORS{"UNKNOWN"} }
|
||||
if (isnotnum($o_memL[0]) || isnotnum($o_memL[1])) {
|
||||
@@ -386,7 +408,16 @@ sub check_options {
|
||||
}
|
||||
}
|
||||
#### CPU checks
|
||||
- if (defined($o_cpu)) {
|
||||
+ if (defined($o_delta)) {
|
||||
+ if (isnotnum($o_delta)) {
|
||||
+ print "Numeric values for delta!\n";
|
||||
+ print_usage();
|
||||
+ exit $ERRORS{"UNKNOWN"};
|
||||
+ }
|
||||
+ $o_cpu = $o_cpu // "";
|
||||
+ }
|
||||
+ if (defined($o_cpu) && length($o_cpu)) {
|
||||
+ $o_delta = $o_delta // $delta_of_time_to_make_average;
|
||||
@o_cpuL = split(/,/, $o_cpu);
|
||||
if ($#o_cpuL != 1) { print "2 values (warning,critical) for cpu\n"; print_usage(); exit $ERRORS{"UNKNOWN"} }
|
||||
if (isnotnum($o_cpuL[0]) || isnotnum($o_cpuL[1])) {
|
||||
@@ -619,24 +650,11 @@ sub check_options {
|
||||
}
|
||||
}
|
||||
|
||||
-if ($num_int == 0) {
|
||||
- print "No process ", (defined($o_noreg)) ? "named " : "matching ", $o_descr, " found : ";
|
||||
- if ($o_critL[0] >= 0) {
|
||||
- print "CRITICAL\n";
|
||||
- exit $ERRORS{"CRITICAL"};
|
||||
- } elsif ($o_warnL[0] >= 0) {
|
||||
- print "WARNING\n";
|
||||
- exit $ERRORS{"WARNING"};
|
||||
- }
|
||||
- print "YOU told me it was : OK\n";
|
||||
- exit $ERRORS{"OK"};
|
||||
-}
|
||||
-
|
||||
my $result = undef;
|
||||
my $num_int_ok = 0;
|
||||
|
||||
# Splitting snmp request because can't use get_bulk_request with v1 protocol
|
||||
-if (!defined($o_get_all)) {
|
||||
+if ($num_int != 0 && !defined($o_get_all)) {
|
||||
if ($count_oid >= 50) {
|
||||
my @toid = undef;
|
||||
my $tmp_num = 0;
|
||||
@@ -697,13 +715,21 @@ sub check_options {
|
||||
my ($res_memory, $res_cpu) = (0, 0);
|
||||
my $memory_print = "";
|
||||
my $cpu_print = "";
|
||||
+
|
||||
###### Checks memory usage
|
||||
|
||||
if (defined($o_mem)) {
|
||||
- if (defined($o_mem_avg)) {
|
||||
- for (my $i = 0; $i < $num_int; $i++) { $res_memory += $result_cons{ $proc_mem_table . "." . $tindex[$i] }; }
|
||||
- $res_memory /= ($num_int_ok * 1024);
|
||||
- verb("Memory average : $res_memory");
|
||||
+ if (defined($o_mem_avg) || defined($o_mem_sum)) {
|
||||
+ verb("Check average: " . ($o_mem_avg // 0) . "; total: " . ($o_mem_sum // 0));
|
||||
+ for (my $i = 0; $i < $num_int; $i++) {
|
||||
+ $res_memory += $result_cons{ $proc_mem_table . "." . $tindex[$i] };
|
||||
+ }
|
||||
+ $res_memory /= 1024; # to Mbytes
|
||||
+ verb("Memory total : $res_memory MB");
|
||||
+ if (defined($o_mem_avg)) {
|
||||
+ $res_memory /= $num_int_ok;
|
||||
+ verb("Memory average : $res_memory MB");
|
||||
+ }
|
||||
} else {
|
||||
for (my $i = 0; $i < $num_int; $i++) {
|
||||
$res_memory
|
||||
@@ -714,17 +740,22 @@ sub check_options {
|
||||
$res_memory /= 1024;
|
||||
verb("Memory max : $res_memory");
|
||||
}
|
||||
- if ($res_memory > $o_memL[1]) {
|
||||
- $final_status = 2;
|
||||
- $memory_print = ", Mem : " . sprintf("%.1f", $res_memory) . "Mb > " . $o_memL[1] . " CRITICAL";
|
||||
- } elsif ($res_memory > $o_memL[0]) {
|
||||
- $final_status = 1;
|
||||
- $memory_print = ", Mem : " . sprintf("%.1f", $res_memory) . "Mb > " . $o_memL[0] . " WARNING";
|
||||
- } else {
|
||||
- $memory_print = ", Mem : " . sprintf("%.1f", $res_memory) . "Mb OK";
|
||||
- }
|
||||
if (defined($o_perf)) {
|
||||
- $perf_output = "'memory_usage'=" . sprintf("%.1f", $res_memory) . "MB;" . $o_memL[0] . ";" . $o_memL[1];
|
||||
+ $perf_output = "'memory_usage'=" . sprintf("%.1f", $res_memory) . "MB";
|
||||
+ }
|
||||
+ if (length($o_mem)) {
|
||||
+ if ($res_memory > $o_memL[1]) {
|
||||
+ $final_status = 2;
|
||||
+ $memory_print = ", Mem : " . sprintf("%.1f", $res_memory) . "MB > " . $o_memL[1] . " CRITICAL";
|
||||
+ } elsif ($res_memory > $o_memL[0]) {
|
||||
+ $final_status = 1;
|
||||
+ $memory_print = ", Mem : " . sprintf("%.1f", $res_memory) . "MB > " . $o_memL[0] . " WARNING";
|
||||
+ } else {
|
||||
+ $memory_print = ", Mem : " . sprintf("%.1f", $res_memory) . "MB OK";
|
||||
+ }
|
||||
+ if (defined($o_perf)) {
|
||||
+ $perf_output .= ";" . $o_memL[0] . ";" . $o_memL[1];
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -789,19 +820,24 @@ sub check_options {
|
||||
if ($return != 0) { $cpu_print .= "! ERROR writing file $temp_file_name !"; $final_status = 3; }
|
||||
##### Check values (if something to check...)
|
||||
if (defined($found_value)) {
|
||||
- if ($found_value > $o_cpuL[1]) {
|
||||
- $final_status = 2;
|
||||
- $cpu_print .= ", Cpu : " . sprintf("%.0f", $found_value) . "% > " . $o_cpuL[1] . " CRITICAL";
|
||||
- } elsif ($found_value > $o_cpuL[0]) {
|
||||
- $final_status = ($final_status == 2) ? 2 : 1;
|
||||
- $cpu_print .= ", Cpu : " . sprintf("%.0f", $found_value) . "% > " . $o_cpuL[0] . " WARNING";
|
||||
- } else {
|
||||
- $cpu_print .= ", Cpu : " . sprintf("%.0f", $found_value) . "% OK";
|
||||
- }
|
||||
if (defined($o_perf)) {
|
||||
if (!defined($perf_output)) { $perf_output = ""; }
|
||||
else { $perf_output .= " "; }
|
||||
- $perf_output .= "'cpu_usage'=" . sprintf("%.0f", $found_value) . "%;" . $o_cpuL[0] . ";" . $o_cpuL[1];
|
||||
+ $perf_output .= "'cpu_usage'=" . sprintf("%.0f", $found_value) . "%";
|
||||
+ }
|
||||
+ if (length($o_cpu)) {
|
||||
+ if ($found_value > $o_cpuL[1]) {
|
||||
+ $final_status = 2;
|
||||
+ $cpu_print .= ", CPU : " . sprintf("%.0f", $found_value) . "% > " . $o_cpuL[1] . " CRITICAL";
|
||||
+ } elsif ($found_value > $o_cpuL[0]) {
|
||||
+ $final_status = ($final_status == 2) ? 2 : 1;
|
||||
+ $cpu_print .= ", CPU : " . sprintf("%.0f", $found_value) . "% > " . $o_cpuL[0] . " WARNING";
|
||||
+ } else {
|
||||
+ $cpu_print .= ", CPU : " . sprintf("%.0f", $found_value) . "% OK";
|
||||
+ }
|
||||
+ if (defined($o_perf)) {
|
||||
+ $perf_output .= ";" . $o_cpuL[0] . ";" . $o_cpuL[1];
|
||||
+ }
|
||||
}
|
||||
} else {
|
||||
if ($final_status == 0) { $final_status = 3 }
|
||||
@@ -809,35 +845,48 @@ sub check_options {
|
||||
}
|
||||
}
|
||||
|
||||
-print $num_int_ok, " process ", (defined($o_noreg)) ? "named " : "matching ", $o_descr, " ";
|
||||
-
|
||||
-#### Check for min and max number of process
|
||||
-if ($num_int_ok <= $o_critL[0]) {
|
||||
- print "(<= ", $o_critL[0], " : CRITICAL)";
|
||||
- $final_status = 2;
|
||||
-} elsif ($num_int_ok <= $o_warnL[0]) {
|
||||
- print "(<= ", $o_warnL[0], " : WARNING)";
|
||||
- $final_status = ($final_status == 2) ? 2 : 1;
|
||||
-} else {
|
||||
- print "(> ", $o_warnL[0], ")";
|
||||
+if ($num_int == 0) {
|
||||
+ print "No processes ", (defined($o_noreg) ? "named " : "matching "), $o_descr, " found : ";
|
||||
+ if ($o_critL[0] >= 0) {
|
||||
+ print "CRITICAL";
|
||||
+ $final_status = 2;
|
||||
+ } elsif ($o_warnL[0] >= 0) {
|
||||
+ print "WARNING";
|
||||
+ $final_status = ($final_status == 2) ? 2 : 1;
|
||||
+ }
|
||||
}
|
||||
-if (defined($o_critL[1]) && ($num_int_ok > $o_critL[1])) {
|
||||
- print " (> ", $o_critL[1], " : CRITICAL)";
|
||||
- $final_status = 2;
|
||||
-} elsif (defined($o_warnL[1]) && ($num_int_ok > $o_warnL[1])) {
|
||||
- print " (> ", $o_warnL[1], " : WARNING)";
|
||||
- $final_status = ($final_status == 2) ? 2 : 1;
|
||||
-} elsif (defined($o_warnL[1])) {
|
||||
- print " (<= ", $o_warnL[1], "):OK";
|
||||
+else {
|
||||
+ print $num_int_ok, " process", ($num_int_ok == 1 ? " " : "es "), (defined($o_noreg) ? "named " : "matching "), $o_descr, " ";
|
||||
+
|
||||
+ #### Check for min and max number of process
|
||||
+ if ($num_int_ok <= $o_critL[0]) {
|
||||
+ print "(<= ", $o_critL[0], " : CRITICAL)";
|
||||
+ $final_status = 2;
|
||||
+ } elsif ($num_int_ok <= $o_warnL[0]) {
|
||||
+ print "(<= ", $o_warnL[0], " : WARNING)";
|
||||
+ $final_status = ($final_status == 2) ? 2 : 1;
|
||||
+ } else {
|
||||
+ print "(> ", $o_warnL[0], ")";
|
||||
+ }
|
||||
+ if (defined($o_critL[1]) && ($num_int_ok > $o_critL[1])) {
|
||||
+ print " (> ", $o_critL[1], " : CRITICAL)";
|
||||
+ $final_status = 2;
|
||||
+ } elsif (defined($o_warnL[1]) && ($num_int_ok > $o_warnL[1])) {
|
||||
+ print " (> ", $o_warnL[1], " : WARNING)";
|
||||
+ $final_status = ($final_status == 2) ? 2 : 1;
|
||||
+ } elsif (defined($o_warnL[1])) {
|
||||
+ print " (<= ", $o_warnL[1], "):OK";
|
||||
+ }
|
||||
}
|
||||
|
||||
print $memory_print, $cpu_print;
|
||||
|
||||
if (defined($o_perf)) {
|
||||
- if (!defined($perf_output)) { $perf_output = ""; }
|
||||
- else { $perf_output .= " "; }
|
||||
- $perf_output .= "'num_process'=" . $num_int_ok . ";" . $o_warnL[0] . ";" . $o_critL[0];
|
||||
- print " | ", $perf_output;
|
||||
+ print " | 'num_process'=" . $num_int_ok;
|
||||
+ print ";" . $o_warnL[0] if defined($o_warn);
|
||||
+ print ";" if defined($o_crit) && !defined($o_warn);
|
||||
+ print ";" . $o_critL[0] if defined($o_crit);
|
||||
+ print " " . $perf_output if length($perf_output // "");
|
||||
}
|
||||
print "\n";
|
||||
|
187
debian/patches/14_check_snmp_int_ign
vendored
Normal file
187
debian/patches/14_check_snmp_int_ign
vendored
Normal file
|
@ -0,0 +1,187 @@
|
|||
From 2d11bcf5c884793eb21a946fdd04cf87baf57ad3 Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Datskevych <me@nek0.net>
|
||||
Date: Wed, 9 Jan 2019 11:25:39 +0100
|
||||
Subject: [PATCH] added ign-admindown, ign-emptyalias options. fixed
|
||||
unitialized variable warning
|
||||
|
||||
---
|
||||
plugins/check_snmp_int.pl | 98 +++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 79 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/plugins/check_snmp_int.pl b/plugins/check_snmp_int.pl
|
||||
index e938131..721c3b2 100755
|
||||
--- a/plugins/check_snmp_int.pl
|
||||
+++ b/plugins/check_snmp_int.pl
|
||||
@@ -35,7 +35,7 @@
|
||||
my $name_table = '1.3.6.1.2.1.31.1.1.1.1';
|
||||
my $alias_table = '.1.3.6.1.2.1.31.1.1.1.18';
|
||||
my $oper_table = '1.3.6.1.2.1.2.2.1.8.';
|
||||
-my $admin_table = '1.3.6.1.2.1.2.2.1.7.';
|
||||
+my $admin_table = '1.3.6.1.2.1.2.2.1.7';
|
||||
my $speed_table = '1.3.6.1.2.1.2.2.1.5.';
|
||||
my $speed_table_64 = '1.3.6.1.2.1.31.1.1.1.15.';
|
||||
my $in_octet_table = '1.3.6.1.2.1.2.2.1.10.';
|
||||
@@ -60,20 +60,22 @@
|
||||
# Globals
|
||||
|
||||
# Standard options
|
||||
-my $o_host = undef; # hostname
|
||||
-my $o_port = 161; # port
|
||||
-my $o_descr = undef; # description filter
|
||||
-my $o_help = undef; # wan't some help ?
|
||||
-my $o_admin = undef; # admin status instead of oper
|
||||
-my $o_inverse = undef; # Critical when up
|
||||
-my $o_dormant = undef; # Dormant state is OK
|
||||
-my $o_down = undef; # Down state is OK
|
||||
-my $o_verb = undef; # verbose mode
|
||||
-my $o_version = undef; # print version
|
||||
-my $o_noreg = undef; # Do not use Regexp for name
|
||||
-my $o_short = undef; # set maximum of n chars to be displayed
|
||||
-my $o_label = undef; # add label before speed (in, out, etc...).
|
||||
-my $o_weather = undef; # output "weathermap" data for NagVis
|
||||
+my $o_host = undef; # hostname
|
||||
+my $o_port = 161; # port
|
||||
+my $o_descr = undef; # description filter
|
||||
+my $o_help = undef; # wan't some help ?
|
||||
+my $o_admin = undef; # admin status instead of oper
|
||||
+my $o_inverse = undef; # Critical when up
|
||||
+my $o_dormant = undef; # Dormant state is OK
|
||||
+my $o_down = undef; # Down state is OK
|
||||
+my $o_ignore_admindown = undef; # Ignore interfaces in admin down state
|
||||
+my $o_ignore_emptyalias = undef; # ignore interfaces with empty alias (interface description string)
|
||||
+my $o_verb = undef; # verbose mode
|
||||
+my $o_version = undef; # print version
|
||||
+my $o_noreg = undef; # Do not use Regexp for name
|
||||
+my $o_short = undef; # set maximum of n chars to be displayed
|
||||
+my $o_label = undef; # add label before speed (in, out, etc...).
|
||||
+my $o_weather = undef; # output "weathermap" data for NagVis
|
||||
|
||||
# Performance data options
|
||||
my $o_perf = undef; # Output performance data
|
||||
@@ -224,6 +226,10 @@ sub help {
|
||||
Dormant state is an OK state
|
||||
--down
|
||||
Down state is an OK state
|
||||
+--ign-admindown
|
||||
+ Ignore interfaces in Admin down state
|
||||
+--ign-emptyalias
|
||||
+ Ignore interfaces having empty alias (port description)
|
||||
-o, --octetlength=INTEGER
|
||||
max-size of the SNMP message, usefull in case of Too Long responses.
|
||||
Be carefull with network filters. Range 484 - 65535, default are
|
||||
@@ -358,7 +364,9 @@ sub check_options {
|
||||
'dormant' => \$o_dormant,
|
||||
'down' => \$o_down,
|
||||
'W' => \$o_weather,
|
||||
- 'weather' => \$o_weather
|
||||
+ 'weather' => \$o_weather,
|
||||
+ 'ign-admindown' => \$o_ignore_admindown,
|
||||
+ 'ign-emptyalias' => \$o_ignore_emptyalias,
|
||||
);
|
||||
if (defined($o_help)) { help(); exit $ERRORS{"UNKNOWN"} }
|
||||
if (defined($o_version)) { p_version(); exit $ERRORS{"UNKNOWN"} }
|
||||
@@ -489,6 +497,14 @@ sub check_options {
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
+
|
||||
+ #### check if --admin and --ign-admindown are put together.
|
||||
+ #### --ign-admindown expects the open_state of the port to be used
|
||||
+ if (defined($o_ignore_admindown) && defined($o_admin)) {
|
||||
+ print "ERROR: --ign-admindown and -a are mutually exclusive. Please select only one.\n\n";
|
||||
+ print_usage();
|
||||
+ exit $ERRORS{"UNKNOWN"};
|
||||
+ }
|
||||
}
|
||||
|
||||
########## MAIN #######
|
||||
@@ -616,6 +632,31 @@ sub check_options {
|
||||
$in_octet_table = $in_octet_table_64;
|
||||
}
|
||||
|
||||
+# If --ign-admindown is set, we need to have admin status table
|
||||
+my $admin_status_table;
|
||||
+if (defined($o_ignore_admindown)) {
|
||||
+ $admin_status_table = $session->get_table(Baseoid => $admin_table);
|
||||
+
|
||||
+ if (!defined($admin_status_table)) {
|
||||
+ printf("ERROR: Admin status table : %s.\n", $session->error);
|
||||
+ $session->close;
|
||||
+ exit $ERRORS{"UNKNOWN"};
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# If --ign-emptyalias is set, we need to have aliases table
|
||||
+my $interfaces_aliases;
|
||||
+if (defined($o_ignore_emptyalias)) {
|
||||
+ $interfaces_aliases = $session->get_table(Baseoid => $alias_table);
|
||||
+
|
||||
+ if (!defined($interfaces_aliases)) {
|
||||
+ printf("ERROR: Alias status table : %s.\n", $session->error);
|
||||
+ $session->close;
|
||||
+ exit $ERRORS{"UNKNOWN"};
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
# Select interface by regexp of exact match
|
||||
# and put the oid to query in an array
|
||||
|
||||
@@ -623,12 +664,30 @@ sub check_options {
|
||||
foreach my $key (sort { $$resultat{$a} cmp $$resultat{$b} } keys %$resultat) {
|
||||
verb("OID : $key, Desc : $$resultat{$key}");
|
||||
|
||||
+ my $ignore = 0;
|
||||
+ my $prefix = $query_table . ".";
|
||||
+ my ($ifindex) = $key =~ /$prefix(\d+)$/;
|
||||
+
|
||||
+ # if ign-admindown is set, check the ifIndex against admin status
|
||||
+ if (defined($o_ignore_admindown)) {
|
||||
+ my $index = $admin_table . "." . $ifindex;
|
||||
+ my $admstatus = $$admin_status_table{$index};
|
||||
+ $ignore = 1 if ($admstatus == 2);
|
||||
+ }
|
||||
+
|
||||
+ # if ign-emptyalias is set, check the ifIndex against alias string
|
||||
+ if (defined($o_ignore_emptyalias)) {
|
||||
+ my $index = $alias_table . "." . $ifindex;
|
||||
+ my $alias = $$interfaces_aliases{$index};
|
||||
+ $ignore = 1 if ($alias eq "");
|
||||
+ }
|
||||
+
|
||||
# test by regexp or exact match
|
||||
my $test
|
||||
= defined($o_noreg)
|
||||
? $$resultat{$key} eq $o_descr
|
||||
: $$resultat{$key} =~ /$o_descr/;
|
||||
- if ($test) {
|
||||
+ if ($test && !$ignore) {
|
||||
|
||||
# get the index number of the interface
|
||||
my @oid_list = split(/\./, $key);
|
||||
@@ -645,7 +704,7 @@ sub check_options {
|
||||
# Get rid of special caracters (specially for Windows)
|
||||
$descr[$num_int] =~ s/[[:cntrl:]]//g;
|
||||
# put the admin or oper oid in an array
|
||||
- $oids[$num_int]= defined ($o_admin) ? $admin_table . $tindex[$num_int]
|
||||
+ $oids[$num_int]= defined ($o_admin) ? $admin_table . "." . $tindex[$num_int]
|
||||
: $oper_table . $tindex[$num_int];
|
||||
|
||||
# Put the performance oid
|
||||
@@ -724,7 +783,7 @@ sub check_options {
|
||||
# Get the status of the current interface
|
||||
my $int_status
|
||||
= defined($o_admin)
|
||||
- ? $$result{ $admin_table . $tindex[$i] }
|
||||
+ ? $$result{ $admin_table . "." . $tindex[$i] }
|
||||
: $$result{ $oper_table . $tindex[$i] };
|
||||
|
||||
# Make the bandwith & error checks if necessary
|
||||
@@ -976,6 +1035,7 @@ sub check_options {
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_discard'=" . $$result{ $oid_perf_outdisc[$i] } . "c ";
|
||||
}
|
||||
if (defined($o_perfs)) {
|
||||
+ my $speed_real = "" unless (defined($speed_real));
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_speed_bps'=" . $speed_real . " ";
|
||||
}
|
||||
if (defined($o_weather) && $usable_data == 1) {
|
32
debian/patches/15_check_snmp_int_spaces
vendored
Normal file
32
debian/patches/15_check_snmp_int_spaces
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
From 8f1c304b82c7bd9f5d1b23faa91ba86b0f99c4e2 Mon Sep 17 00:00:00 2001
|
||||
From: PGranado <pgranado@pt.lu>
|
||||
Date: Fri, 22 Mar 2019 15:05:32 +0100
|
||||
Subject: [PATCH] Add spaces only if necessary, resolving bug #32
|
||||
|
||||
---
|
||||
plugins/check_snmp_int.pl | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/plugins/check_snmp_int.pl
|
||||
+++ b/plugins/check_snmp_int.pl
|
||||
@@ -777,7 +777,7 @@
|
||||
# make all checks and output for all interfaces
|
||||
for (my $i = 0; $i < $num_int; $i++) {
|
||||
$print_out .= ", " if (defined($print_out));
|
||||
- $perf_out .= " " if (defined($perf_out));
|
||||
+
|
||||
my $usable_data = 1;
|
||||
|
||||
# Get the status of the current interface
|
||||
@@ -785,7 +785,10 @@
|
||||
= defined($o_admin)
|
||||
? $$result{ $admin_table . "." . $tindex[$i] }
|
||||
: $$result{ $oper_table . $tindex[$i] };
|
||||
-
|
||||
+
|
||||
+ # Add spaces only if necessary
|
||||
+ $perf_out .= " " if (defined ($perf_out) && $int_status==2 ) ;
|
||||
+
|
||||
# Make the bandwith & error checks if necessary
|
||||
if (defined($o_checkperf) && $int_status == 1) {
|
||||
$temp_file_name = $descr[$i];
|
178
debian/patches/16_check_snmp_win_max_message_size
vendored
Normal file
178
debian/patches/16_check_snmp_win_max_message_size
vendored
Normal file
|
@ -0,0 +1,178 @@
|
|||
From dc67e601453a564db68d7921f16fb6ea875f68be Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mathias=20V=C3=A9drines?= <mvedrines@capensis.fr>
|
||||
Date: Fri, 21 Feb 2020 12:18:53 +0100
|
||||
Subject: [PATCH] Add -o option (max message size) in check_snmp_win
|
||||
|
||||
---
|
||||
plugins/check_snmp_win.pl | 121 +++++++++++++++++++++++---------------
|
||||
1 file changed, 72 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/plugins/check_snmp_win.pl b/plugins/check_snmp_win.pl
|
||||
index 148d6eb..c5cb573 100755
|
||||
--- a/plugins/check_snmp_win.pl
|
||||
+++ b/plugins/check_snmp_win.pl
|
||||
@@ -47,24 +47,25 @@
|
||||
|
||||
my $Name = 'check_snmp_win';
|
||||
|
||||
-my $o_host = undef; # hostname
|
||||
-my $o_community = undef; # community
|
||||
-my $o_port = 161; # port
|
||||
-my $o_version2 = undef; #use snmp v2c
|
||||
-my $o_descr = undef; # description filter
|
||||
-my @o_descrL = undef; # Service descriprion list.
|
||||
-my $o_showall = undef; # Show all services even if OK
|
||||
-my $o_type = "service"; # Check type (service, ...)
|
||||
-my $o_number = undef; # Number of service for warn and crit levels
|
||||
-my $o_help = undef; # wan't some help ?
|
||||
-my $o_verb = undef; # verbose mode
|
||||
-my $o_version = undef; # print version
|
||||
-my $o_noreg = undef; # Do not use Regexp for name
|
||||
-my $o_timeout = 5; # Default 5s Timeout
|
||||
+my $o_host = undef; # hostname
|
||||
+my $o_community = undef; # community
|
||||
+my $o_port = 161; # port
|
||||
+my $o_version2 = undef; # use snmp v2c
|
||||
+my $o_descr = undef; # description filter
|
||||
+my @o_descrL = undef; # Service descriprion list.
|
||||
+my $o_showall = undef; # Show all services even if OK
|
||||
+my $o_type = "service"; # Check type (service, ...)
|
||||
+my $o_number = undef; # Number of service for warn and crit levels
|
||||
+my $o_help = undef; # wan't some help ?
|
||||
+my $o_verb = undef; # verbose mode
|
||||
+my $o_version = undef; # print version
|
||||
+my $o_noreg = undef; # Do not use Regexp for name
|
||||
+my $o_timeout = 5; # Default 5s Timeout
|
||||
+my $o_octetlength = undef; # SNMP max message size
|
||||
|
||||
# SNMP V3 specific
|
||||
-my $o_login = undef; # snmp v3 login
|
||||
-my $o_passwd = undef; # snmp v3 passwd
|
||||
+my $o_login = undef; # snmp v3 login
|
||||
+my $o_passwd = undef; # snmp v3 passwd
|
||||
|
||||
# functions
|
||||
|
||||
@@ -72,7 +73,7 @@
|
||||
|
||||
sub print_usage {
|
||||
print
|
||||
-"Usage: $Name [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd) [-p <port>] -n <name>[,<name2] [-T=service] [-r] [-s] [-N=<n>] [-t <timeout>] [-V]\n";
|
||||
+"Usage: $Name [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd) [-p <port>] -n <name>[,<name2] [-T=service] [-r] [-s] [-N=<n>] [-t <timeout>] [-o <octet_length>] [-V]\n";
|
||||
}
|
||||
|
||||
sub isnotnum { # Return true if arg is not a number
|
||||
@@ -128,6 +129,8 @@ sub help {
|
||||
Do not use regexp to match NAME in service description.
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
+-o, --octetlength=INTEGER
|
||||
+ SNMP max message size (484-65535)
|
||||
-V, --version
|
||||
prints version number
|
||||
Note :
|
||||
@@ -162,36 +165,38 @@ sub decode_utf8 { # just replaces UFT8 caracters by "."
|
||||
sub check_options {
|
||||
Getopt::Long::Configure("bundling");
|
||||
GetOptions(
|
||||
- 'v' => \$o_verb,
|
||||
- 'verbose' => \$o_verb,
|
||||
- 'h' => \$o_help,
|
||||
- 'help' => \$o_help,
|
||||
- 'H:s' => \$o_host,
|
||||
- 'hostname:s' => \$o_host,
|
||||
- 'p:i' => \$o_port,
|
||||
- 'port:i' => \$o_port,
|
||||
- 'C:s' => \$o_community,
|
||||
- 'community:s' => \$o_community,
|
||||
- 'l:s' => \$o_login,
|
||||
- 'login:s' => \$o_login,
|
||||
- 'x:s' => \$o_passwd,
|
||||
- 'passwd:s' => \$o_passwd,
|
||||
- 't:i' => \$o_timeout,
|
||||
- 'timeout:i' => \$o_timeout,
|
||||
- 'n:s' => \$o_descr,
|
||||
- 'name:s' => \$o_descr,
|
||||
- 'r' => \$o_noreg,
|
||||
- 'noregexp' => \$o_noreg,
|
||||
- 'T:s' => \$o_type,
|
||||
- 'type:s' => \$o_type,
|
||||
- 'N:i' => \$o_number,
|
||||
- 'number:i' => \$o_number,
|
||||
- '2' => \$o_version2,
|
||||
- 'v2c' => \$o_version2,
|
||||
- 's' => \$o_showall,
|
||||
- 'showall' => \$o_showall,
|
||||
- 'V' => \$o_version,
|
||||
- 'version' => \$o_version
|
||||
+ 'v' => \$o_verb,
|
||||
+ 'verbose' => \$o_verb,
|
||||
+ 'h' => \$o_help,
|
||||
+ 'help' => \$o_help,
|
||||
+ 'H:s' => \$o_host,
|
||||
+ 'hostname:s' => \$o_host,
|
||||
+ 'p:i' => \$o_port,
|
||||
+ 'port:i' => \$o_port,
|
||||
+ 'C:s' => \$o_community,
|
||||
+ 'community:s' => \$o_community,
|
||||
+ 'l:s' => \$o_login,
|
||||
+ 'login:s' => \$o_login,
|
||||
+ 'x:s' => \$o_passwd,
|
||||
+ 'passwd:s' => \$o_passwd,
|
||||
+ 't:i' => \$o_timeout,
|
||||
+ 'timeout:i' => \$o_timeout,
|
||||
+ 'n:s' => \$o_descr,
|
||||
+ 'name:s' => \$o_descr,
|
||||
+ 'r' => \$o_noreg,
|
||||
+ 'noregexp' => \$o_noreg,
|
||||
+ 'T:s' => \$o_type,
|
||||
+ 'type:s' => \$o_type,
|
||||
+ 'N:i' => \$o_number,
|
||||
+ 'number:i' => \$o_number,
|
||||
+ '2' => \$o_version2,
|
||||
+ 'v2c' => \$o_version2,
|
||||
+ 'o:i' => \$o_octetlength,
|
||||
+ 'octetlength:i' => \$o_octetlength,
|
||||
+ 's' => \$o_showall,
|
||||
+ 'showall' => \$o_showall,
|
||||
+ 'V' => \$o_version,
|
||||
+ 'version' => \$o_version
|
||||
);
|
||||
if (defined($o_help)) { help(); exit $ERRORS{"UNKNOWN"} }
|
||||
if (defined($o_version)) { p_version(); exit $ERRORS{"UNKNOWN"} }
|
||||
@@ -222,6 +227,13 @@ sub check_options {
|
||||
}
|
||||
}
|
||||
|
||||
+ # Octet length check
|
||||
+ if (defined($o_octetlength) && (isnotnum($o_octetlength) || $o_octetlength > 65535 || $o_octetlength < 484)) {
|
||||
+ print "octet length must be in range 484 .. 65535\n";
|
||||
+ print_usage();
|
||||
+ exit $ERRORS{'UNKNOWN'};
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
########## MAIN #######
|
||||
@@ -283,8 +295,19 @@ sub check_options {
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
-$session->max_msg_size(5000);
|
||||
-verb($session->max_msg_size);
|
||||
+if (defined($o_octetlength)) {
|
||||
+ my $oct_resultat = undef;
|
||||
+ my $oct_test = $session->max_msg_size();
|
||||
+ verb(" actual max octets:: $oct_test");
|
||||
+ $oct_resultat = $session->max_msg_size($o_octetlength);
|
||||
+ if (!defined($oct_resultat)) {
|
||||
+ printf("ERROR: Session settings : %s.\n", $session->error);
|
||||
+ $session->close;
|
||||
+ exit $ERRORS{"UNKNOWN"};
|
||||
+ }
|
||||
+ $oct_test = $session->max_msg_size();
|
||||
+ verb(" new max octets:: $oct_test");
|
||||
+}
|
||||
|
||||
# Look for process in name or path name table
|
||||
my $resultat = undef;
|
61
debian/patches/17_check_snmp_storage_okifempty
vendored
Normal file
61
debian/patches/17_check_snmp_storage_okifempty
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
From fd5ae19315a26530159f8ab221a190ac52de3195 Mon Sep 17 00:00:00 2001
|
||||
From: roa <roa@eurotux.com>
|
||||
Date: Mon, 9 Mar 2020 11:56:04 +0000
|
||||
Subject: [PATCH] check_snmp_storage.pl: add support for allowing considering
|
||||
OK if no storage found matching given criteria
|
||||
|
||||
---
|
||||
plugins/check_snmp_storage.pl | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/plugins/check_snmp_storage.pl b/plugins/check_snmp_storage.pl
|
||||
index 3593f79..887800a 100755
|
||||
--- a/plugins/check_snmp_storage.pl
|
||||
+++ b/plugins/check_snmp_storage.pl
|
||||
@@ -73,6 +73,7 @@
|
||||
my $o_sum = undef; # add all storage before testing
|
||||
my $o_index = undef; # Parse index instead of description
|
||||
my $o_negate = undef; # Negate the regexp if set
|
||||
+my $o_okifempty = undef; # Consider OK if no disks found
|
||||
my $o_timeout = 5; # Default 5s Timeout
|
||||
my $o_perf = undef; # Output performance data
|
||||
my $o_short = undef; # Short output parameters
|
||||
@@ -98,7 +99,7 @@
|
||||
|
||||
sub print_usage {
|
||||
print
|
||||
-"Usage: $Name [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]\n";
|
||||
+"Usage: $Name [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-O] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]\n";
|
||||
}
|
||||
|
||||
sub round ($$) {
|
||||
@@ -180,6 +181,8 @@ sub help {
|
||||
-e, --exclude
|
||||
Select all storages except the one(s) selected by -m
|
||||
No action on storage type selection
|
||||
+-O, --okifempty
|
||||
+ Consider OK instead of UNKNOWN if no storage found with given criteria
|
||||
-T, --type=TYPE
|
||||
pl : calculate percent left
|
||||
pu : calculate percent used (Default)
|
||||
@@ -279,6 +282,8 @@ sub check_options {
|
||||
'index' => \$o_index,
|
||||
'e' => \$o_negate,
|
||||
'exclude' => \$o_negate,
|
||||
+ 'O' => \$o_okifempty,
|
||||
+ 'okifempty' => \$o_okifempty,
|
||||
'V' => \$o_version,
|
||||
'version' => \$o_version,
|
||||
'q:s' => \$o_storagetype,
|
||||
@@ -590,7 +595,10 @@ sub check_options {
|
||||
}
|
||||
}
|
||||
verb("storages selected : $num_int");
|
||||
-if ($num_int == 0) { print "Unknown storage : $o_descr : ERROR\n"; exit $ERRORS{"UNKNOWN"}; }
|
||||
+if ($num_int == 0) {
|
||||
+ if ($o_okifempty) { print "No storage found matching given criteria, but future new disks will be monitored\n"; exit $ERRORS{"OK"}; }
|
||||
+ else { print "Unknown storage : $o_descr : ERROR\n"; exit $ERRORS{"UNKNOWN"}; }
|
||||
+}
|
||||
|
||||
my $result = undef;
|
||||
|
41
debian/patches/18_check_snmp_int_fix_perf_out
vendored
Normal file
41
debian/patches/18_check_snmp_int_fix_perf_out
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
From effd196f76c4f4e9505b0955b020f8f65f1700a2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Pawe=C5=82=20Szafer?= <pszafer@gmail.com>
|
||||
Date: Mon, 16 Mar 2020 18:41:49 +0100
|
||||
Subject: [PATCH] fix perf_out not defined error
|
||||
|
||||
---
|
||||
plugins/check_snmp_int.pl | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/plugins/check_snmp_int.pl
|
||||
+++ b/plugins/check_snmp_int.pl
|
||||
@@ -1053,24 +1053,25 @@
|
||||
|
||||
# Check if all interface are OK
|
||||
if ($num_ok == $num_int) {
|
||||
+ my $is_perf_defined = defined($perf_out) && defined($o_perf);
|
||||
if ($final_status == 0) {
|
||||
print $print_out, ":", $num_ok, " UP: OK";
|
||||
- if (defined($o_perf)) { print " | ", $perf_out; }
|
||||
+ if ($is_perf_defined) { print " | ", $perf_out; }
|
||||
print "\n";
|
||||
exit $ERRORS{"OK"};
|
||||
} elsif ($final_status == 1) {
|
||||
print $print_out, ":(", $num_ok, " UP): WARNING";
|
||||
- if (defined($o_perf)) { print " | ", $perf_out; }
|
||||
+ if ($is_perf_defined) { print " | ", $perf_out; }
|
||||
print "\n";
|
||||
exit $ERRORS{"WARNING"};
|
||||
} elsif ($final_status == 2) {
|
||||
print $print_out, ":(", $num_ok, " UP): CRITICAL";
|
||||
- if (defined($o_perf)) { print " | ", $perf_out; }
|
||||
+ if ($is_perf_defined) { print " | ", $perf_out; }
|
||||
print "\n";
|
||||
exit $ERRORS{"CRITICAL"};
|
||||
} else {
|
||||
print $print_out, ":(", $num_ok, " UP): UNKNOWN";
|
||||
- if (defined($perf_out)) { print " | ", $perf_out; }
|
||||
+ if ($is_perf_defined) { print " | ", $perf_out; }
|
||||
print "\n";
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
23
debian/patches/19_check_snmp_int_remove_unneeded_my
vendored
Normal file
23
debian/patches/19_check_snmp_int_remove_unneeded_my
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
From 524e0eec7407bb0f650e28aa3d26e16028b86e54 Mon Sep 17 00:00:00 2001
|
||||
From: Steffen Schoch <dein@gehirn-mag.net>
|
||||
Date: Tue, 27 Apr 2021 06:14:34 +0200
|
||||
Subject: [PATCH] Update check_snmp_int.pl
|
||||
|
||||
Removed unneeded my
|
||||
---
|
||||
plugins/check_snmp_int.pl | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/plugins/check_snmp_int.pl b/plugins/check_snmp_int.pl
|
||||
index 5fe752e..271cfbc 100755
|
||||
--- a/plugins/check_snmp_int.pl
|
||||
+++ b/plugins/check_snmp_int.pl
|
||||
@@ -1038,7 +1038,7 @@ sub check_options {
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_discard'=" . $$result{ $oid_perf_outdisc[$i] } . "c ";
|
||||
}
|
||||
if (defined($o_perfs)) {
|
||||
- my $speed_real = "" unless (defined($speed_real));
|
||||
+ $speed_real = "" unless (defined($speed_real));
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_speed_bps'=" . $speed_real . " ";
|
||||
}
|
||||
if (defined($o_weather) && $usable_data == 1) {
|
93
debian/patches/20_check_snmp_int_avaid_huge_amount_of_regex
vendored
Normal file
93
debian/patches/20_check_snmp_int_avaid_huge_amount_of_regex
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
From c591f7d56378cbb40f1c3c23cbf23a8669a45730 Mon Sep 17 00:00:00 2001
|
||||
From: kwork-er <88452982+kwork-er@users.noreply.github.com>
|
||||
Date: Thu, 5 Aug 2021 21:53:43 +0200
|
||||
Subject: [PATCH] Update check_snmp_int.pl
|
||||
|
||||
Effectively reverting commit 9f9b15a926d8795935b54626dc3ab9e5becb2763 and doing it in a different way that avoids adding huge amounts of regex, that may not run on older systems.
|
||||
Removed the added " =~ s/\./_/r ", instead replacing the dots (.) in the regex that was meant for it in the first place -> line 967.
|
||||
---
|
||||
plugins/check_snmp_int.pl | 28 ++++++++++++++--------------
|
||||
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/plugins/check_snmp_int.pl b/plugins/check_snmp_int.pl
|
||||
index 271cfbc..71f8d14 100755
|
||||
--- a/plugins/check_snmp_int.pl
|
||||
+++ b/plugins/check_snmp_int.pl
|
||||
@@ -964,7 +964,7 @@ sub check_options {
|
||||
}
|
||||
|
||||
# Get rid of special caracters for performance in description
|
||||
- $descr[$i] =~ s/'\/\(\)/_/g;
|
||||
+ $descr[$i] =~ s/['\/\(\).]/_/g;
|
||||
if (($int_status == $ok_val) || (defined($o_down) && $int_status == 2) || (defined($o_dormant) && $int_status == 5))
|
||||
{
|
||||
$num_ok++;
|
||||
@@ -979,12 +979,12 @@ sub check_options {
|
||||
$warn_factor /= $speed_real;
|
||||
$warn_factor *= 100; # now turn into displayed % : 0,1 = 10%
|
||||
}
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_prct'=";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_in_prct'=";
|
||||
$perf_out .= sprintf("%.0f", $checkperf_out_raw[0] * 800 / $speed_real) . "%;";
|
||||
$perf_out .= ($o_warn[0] != 0) ? sprintf("%.0f", $o_warn[0] * $warn_factor) . ";" : ";";
|
||||
$perf_out .= ($o_crit[0] != 0) ? sprintf("%.0f", $o_crit[0] * $warn_factor) . ";" : ";";
|
||||
$perf_out .= "0;100 ";
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_prct'=";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_out_prct'=";
|
||||
$perf_out .= sprintf("%.0f", $checkperf_out_raw[1] * 800 / $speed_real) . "%;";
|
||||
$perf_out .= ($o_warn[1] != 0) ? sprintf("%.0f", $o_warn[1] * $warn_factor) . ";" : ";";
|
||||
$perf_out .= ($o_crit[1] != 0) ? sprintf("%.0f", $o_crit[1] * $warn_factor) . ";" : ";";
|
||||
@@ -1000,12 +1000,12 @@ sub check_options {
|
||||
} else { # just convert from K|M|G bps
|
||||
$warn_factor = (defined($o_meg)) ? 1000000 : (defined($o_gig)) ? 1000000000 : 1000;
|
||||
}
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_bps'=";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_in_bps'=";
|
||||
$perf_out .= sprintf("%.0f", $checkperf_out_raw[0] * 8) . ";";
|
||||
$perf_out .= ($o_warn[0] != 0) ? $o_warn[0] * $warn_factor . ";" : ";";
|
||||
$perf_out .= ($o_crit[0] != 0) ? $o_crit[0] * $warn_factor . ";" : ";";
|
||||
$perf_out .= "0;" . $speed_real . " ";
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_bps'=";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_out_bps'=";
|
||||
$perf_out .= sprintf("%.0f", $checkperf_out_raw[1] * 8) . ";";
|
||||
$perf_out .= ($o_warn[1] != 0) ? $o_warn[1] * $warn_factor . ";" : ";";
|
||||
$perf_out .= ($o_crit[1] != 0) ? $o_crit[1] * $warn_factor . ";" : ";";
|
||||
@@ -1017,29 +1017,29 @@ sub check_options {
|
||||
} else { # just convert from K|M|G bps
|
||||
$warn_factor = (defined($o_meg)) ? 1048576 : (defined($o_gig)) ? 1073741824 : 1024;
|
||||
}
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_Bps'=" . sprintf("%.0f", $checkperf_out_raw[0]) . ";";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_in_Bps'=" . sprintf("%.0f", $checkperf_out_raw[0]) . ";";
|
||||
$perf_out .= ($o_warn[0] != 0) ? $o_warn[0] * $warn_factor . ";" : ";";
|
||||
$perf_out .= ($o_crit[0] != 0) ? $o_crit[0] * $warn_factor . ";" : ";";
|
||||
$perf_out .= "0;" . $speed_real / 8 . " ";
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_Bps'=" . sprintf("%.0f", $checkperf_out_raw[1]) . ";";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_out_Bps'=" . sprintf("%.0f", $checkperf_out_raw[1]) . ";";
|
||||
$perf_out .= ($o_warn[1] != 0) ? $o_warn[1] * $warn_factor . ";" : ";";
|
||||
$perf_out .= ($o_crit[1] != 0) ? $o_crit[1] * $warn_factor . ";" : ";";
|
||||
$perf_out .= "0;" . $speed_real / 8 . " ";
|
||||
}
|
||||
}
|
||||
} else { # output in octet counter
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_octet'=" . $$result{ $oid_perf_inoct[$i] } . "c ";
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_octet'=" . $$result{ $oid_perf_outoct[$i] } . "c ";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_in_octet'=" . $$result{ $oid_perf_inoct[$i] } . "c ";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_out_octet'=" . $$result{ $oid_perf_outoct[$i] } . "c ";
|
||||
}
|
||||
if (defined($o_perfe)) {
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_error'=" . $$result{ $oid_perf_inerr[$i] } . "c ";
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_discard'=" . $$result{ $oid_perf_indisc[$i] } . "c ";
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_error'=" . $$result{ $oid_perf_outerr[$i] } . "c ";
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_discard'=" . $$result{ $oid_perf_outdisc[$i] } . "c ";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_in_error'=" . $$result{ $oid_perf_inerr[$i] } . "c ";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_in_discard'=" . $$result{ $oid_perf_indisc[$i] } . "c ";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_out_error'=" . $$result{ $oid_perf_outerr[$i] } . "c ";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_out_discard'=" . $$result{ $oid_perf_outdisc[$i] } . "c ";
|
||||
}
|
||||
if (defined($o_perfs)) {
|
||||
$speed_real = "" unless (defined($speed_real));
|
||||
- $perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_speed_bps'=" . $speed_real . " ";
|
||||
+ $perf_out .= "'" . $descr[$i] . "_speed_bps'=" . $speed_real . " ";
|
||||
}
|
||||
if (defined($o_weather) && $usable_data == 1) {
|
||||
$perf_out .= "in=" . sprintf("%.0f", $checkperf_out_raw[0]) . ";;;0;" . sprintf("%.0f", $speed_real / 8) . " ";
|
90
debian/patches/21_check_snmp_load_update_fortiswitch_and_fortigate4.3
vendored
Normal file
90
debian/patches/21_check_snmp_load_update_fortiswitch_and_fortigate4.3
vendored
Normal file
|
@ -0,0 +1,90 @@
|
|||
From 946bd37f5632fead9382f05a3600f0328dae53a1 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Botka <16738302+Haxk20@users.noreply.github.com>
|
||||
Date: Mon, 1 Aug 2022 12:14:37 +0200
|
||||
Subject: [PATCH] check_snmp_load.pl: Add Fortiswitch & 4.3+ firmware fortigate
|
||||
|
||||
This commit adds support for checking the fortiswitch CPU usage
|
||||
and also fortigate 4.3 and above firmware. This OID got changed but to keep
|
||||
backwards compatibility and not to break already running platforms depending on this
|
||||
the new OID was added as new type.
|
||||
|
||||
Signed-off-by: Martin Botka <martin.botka@somainline.org>
|
||||
---
|
||||
plugins/check_snmp_load.pl | 21 ++++++++++++++-------
|
||||
1 file changed, 14 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/plugins/check_snmp_load.pl b/plugins/check_snmp_load.pl
|
||||
index 0959f6a..ecafb59 100755
|
||||
--- a/plugins/check_snmp_load.pl
|
||||
+++ b/plugins/check_snmp_load.pl
|
||||
@@ -81,6 +81,12 @@
|
||||
# Fortigate CPU
|
||||
my $fortigate_cpu = ".1.3.6.1.4.1.12356.1.8.0"; # Fortigate CPU % usage
|
||||
|
||||
+# Fortigate CPU
|
||||
+my $fortigate43_cpu = "1.3.6.1.4.1.12356.101.4.1.3.0"; # Fortigate 4.3 firmware CPU % usage
|
||||
+
|
||||
+# Fortigate CPU
|
||||
+my $fortiswitch_cpu = ".1.3.6.1.4.1.12356.106.4.1.2.0"; # Fortiswitch CPU % usage
|
||||
+
|
||||
# Linkproof Appliance
|
||||
my $linkproof_cpu = "1.3.6.1.4.1.89.35.1.55.0"; # CPU RE (Routing Engine Tasks)
|
||||
|
||||
@@ -95,12 +101,12 @@
|
||||
|
||||
# valid values
|
||||
my @valid_types
|
||||
- = ("stand", "netsc", "netsl", "as400", "cisco", "cata", "cisg", "nsc", "fg", "bc", "nokia", "hp", "lp", "hpux", "n5k");
|
||||
+ = ("stand", "netsc", "netsl", "as400", "cisco", "cata", "cisg", "nsc", "fg", "fg43", "fs", "bc", "nokia", "hp", "lp", "hpux", "n5k");
|
||||
|
||||
# CPU OID array
|
||||
my %cpu_oid = (
|
||||
"netsc", $ns_cpu_idle, "as400", $as400_cpu, "bc", $bluecoat_cpu, "nokia", $nokia_cpu,
|
||||
- "hp", $procurve_cpu, "lp", $linkproof_cpu, "fg", $fortigate_cpu, "n5k", $n5k_cpu
|
||||
+ "hp", $procurve_cpu, "lp", $linkproof_cpu, "fg", $fortigate_cpu, "fg43", $fortigate43_cpu, "fs", $fortiswitch_cpu, "n5k", $n5k_cpu
|
||||
);
|
||||
|
||||
# Globals
|
||||
@@ -113,7 +119,7 @@
|
||||
my $o_verb = undef; # verbose mode
|
||||
my $o_version = undef; # print version
|
||||
|
||||
-# check type : stand | netsc | netsl | as400 | cisco | cata | cisg | nsc | fg | bc | nokia | hp | lp | hpux
|
||||
+# check type : stand | netsc | netsl | as400 | cisco | cata | cisg | nsc | fg | fg43| fs | bc | nokia | hp | lp | hpux
|
||||
my $o_check_type = "stand";
|
||||
|
||||
# End compatibility
|
||||
@@ -139,7 +145,7 @@
|
||||
|
||||
sub print_usage {
|
||||
print
|
||||
-"Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -w <warn level> -c <crit level> -T=[stand|netsl|netsc|as400|cisco|cata|cisg|nsc|fg|bc|nokia|hp|lp|hpux] [-f] [-t <timeout>] [-V]\n";
|
||||
+"Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -w <warn level> -c <crit level> -T=[stand|netsl|netsc|as400|cisco|cata|cisg|nsc|fg|fg43|fs|bc|nokia|hp|lp|hpux] [-f] [-t <timeout>] [-V]\n";
|
||||
}
|
||||
|
||||
sub isnnum { # Return true if arg is not a number
|
||||
@@ -201,6 +207,8 @@ sub help {
|
||||
cisg : Cisco small business (SG500) CPU usage (1,5 & 15 minutes values)
|
||||
nsc : NetScreen CPU usage
|
||||
fg : Fortigate CPU usage
|
||||
+ fg43 : Fortigate CPU usage for 4.3 firmware
|
||||
+ fs : Fortiswitch CPU usage
|
||||
bc : Bluecoat CPU usage
|
||||
nokia : Nokia CPU usage
|
||||
hp : HP procurve switch CPU usage
|
||||
@@ -806,8 +814,8 @@ sub is_legacy_snmp_version {
|
||||
exit $exit_val;
|
||||
}
|
||||
|
||||
-################## CPU for : AS/400 , Netsnmp, HP, Bluecoat, linkproof, fortigate ###########
|
||||
-if ($o_check_type =~ /netsc|as400|bc|nokia|^hp$|lp|fg/) {
|
||||
+################## CPU for : AS/400 , Netsnmp, HP, Bluecoat, linkproof, fortigate, fortigate43, fortiswitch ###########
|
||||
+if ($o_check_type =~ /netsc|as400|bc|nokia|^hp$|lp|fg|fg43|fs/) {
|
||||
|
||||
# Get load table
|
||||
my @oidlist = $cpu_oid{$o_check_type};
|
||||
@@ -965,4 +973,3 @@ sub is_legacy_snmp_version {
|
||||
? print " | cpu_prct_used=$cpu_used%;$o_warn;$o_crit\n"
|
||||
: print "\n";
|
||||
exit $exit_val;
|
||||
-
|
423
debian/patches/22_check_snmp_storage_fix_space_btrfs
vendored
Normal file
423
debian/patches/22_check_snmp_storage_fix_space_btrfs
vendored
Normal file
|
@ -0,0 +1,423 @@
|
|||
From 42f4ebf23be504e448513a67faa99e02a3d5e3b5 Mon Sep 17 00:00:00 2001
|
||||
From: IB Development Team <dev@ib.pl>
|
||||
Date: Thu, 19 Jan 2023 10:36:45 +0000
|
||||
Subject: [PATCH] No out of space check_snmp_storage warning on btrfs
|
||||
|
||||
We've noticed out of space condition in one of btrfs filesystems
|
||||
monitored with check_snmp_storage; problem was not detected by
|
||||
check_snmp_storage.
|
||||
|
||||
Filesystem status:
|
||||
|
||||
root@mysrv:~# btrfs fi df -b /mnt
|
||||
Data, single: total=2222194688, used=2222194688
|
||||
System, DUP: total=8388608, used=16384
|
||||
System, single: total=4194304, used=0
|
||||
Metadata, DUP: total=484835328, used=163921920
|
||||
Metadata, single: total=8388608, used=0
|
||||
GlobalReserve, single: total=16777216, used=0
|
||||
|
||||
root@mysrv:~# df -B1 /mnt
|
||||
Filesystem 1B-blocks Used Available Use% Mounted on
|
||||
/dev/mapper/myvg 3221225472 2566848512 0 100% /mnt
|
||||
|
||||
Net-snmp snmp infos for this fs:
|
||||
|
||||
hrStorageTable (used by check_snmp_storage):
|
||||
|
||||
iso.3.6.1.2.1.25.2.3.1.1.69 = INTEGER: 69 //
|
||||
hrStorageIndex
|
||||
iso.3.6.1.2.1.25.2.3.1.2.69 = OID: iso.3.6.1.2.1.25.2.1.4 //
|
||||
hrStorageType
|
||||
iso.3.6.1.2.1.25.2.3.1.3.69 = STRING: "/mnt" //
|
||||
hrStorageDescr
|
||||
iso.3.6.1.2.1.25.2.3.1.4.69 = INTEGER: 4096 //
|
||||
hrStorageAllocationUnits
|
||||
iso.3.6.1.2.1.25.2.3.1.5.69 = INTEGER: 786432 //
|
||||
hrStorageSize
|
||||
iso.3.6.1.2.1.25.2.3.1.6.69 = INTEGER: 626672 //
|
||||
hrStorageUsed
|
||||
|
||||
dskTable (not used by check_snmp_storage):
|
||||
|
||||
iso.3.6.1.4.1.2021.9.1.1.19 = INTEGER:
|
||||
19 // dskIndex
|
||||
iso.3.6.1.4.1.2021.9.1.2.19 = STRING:
|
||||
"/mnt" // dskPath
|
||||
iso.3.6.1.4.1.2021.9.1.3.19 = STRING: "/dev/mapper/myvg" //
|
||||
dskDevice
|
||||
iso.3.6.1.4.1.2021.9.1.4.19 = INTEGER:
|
||||
-1 // dskMinimum
|
||||
iso.3.6.1.4.1.2021.9.1.5.19 = INTEGER:
|
||||
10 // dskMinPercent
|
||||
iso.3.6.1.4.1.2021.9.1.6.19 = INTEGER:
|
||||
3145728 // dskTotal (Total size of the
|
||||
disk/partion (kBytes))
|
||||
iso.3.6.1.4.1.2021.9.1.7.19 = INTEGER:
|
||||
0 // dskAvail (Available space on the
|
||||
disk)
|
||||
iso.3.6.1.4.1.2021.9.1.8.19 = INTEGER:
|
||||
2506688 // dskUsed (Used space on the disk)
|
||||
iso.3.6.1.4.1.2021.9.1.9.19 = INTEGER:
|
||||
80 // dskPercent (Percentage of space
|
||||
used on disk)
|
||||
iso.3.6.1.4.1.2021.9.1.10.19 = INTEGER:
|
||||
0 // dskPercentNode (Percentage of
|
||||
inodes used on disk)
|
||||
iso.3.6.1.4.1.2021.9.1.11.19 = Gauge32:
|
||||
3145728 // dskTotalLow Total size of the
|
||||
disk/partion (kBytes). Together with dskTotalHigh composes 64-bit
|
||||
number)
|
||||
iso.3.6.1.4.1.2021.9.1.12.19 = Gauge32:
|
||||
0 // dskTotalHigh (Total size of the
|
||||
disk/partion (kBytes). Together with dskTotalLow composes 64-bit
|
||||
number.)
|
||||
iso.3.6.1.4.1.2021.9.1.13.19 = Gauge32:
|
||||
0 // dskAvailLow (Available space on
|
||||
the disk (kBytes). Together with dskAvailHigh composes 64-bit number.)
|
||||
iso.3.6.1.4.1.2021.9.1.14.19 = Gauge32:
|
||||
0 // dskAvailHigh (Available space on
|
||||
the disk (kBytes). Together with dskAvailLow composes 64-bit number.)
|
||||
iso.3.6.1.4.1.2021.9.1.15.19 = Gauge32:
|
||||
2506688 // dskUsedLow (Used space on the disk
|
||||
(kBytes). Together with dskUsedHigh composes 64-bit number.)
|
||||
iso.3.6.1.4.1.2021.9.1.16.19 = Gauge32:
|
||||
0 // dskUsedHigh (Used space on the
|
||||
disk (kBytes). Together with dskUsedLow composes 64-bit number.)
|
||||
iso.3.6.1.4.1.2021.9.1.100.19 = INTEGER:
|
||||
1 // dskErrorFlag (Error flag signaling
|
||||
that the disk or partition is under the minimum required space
|
||||
configured for it.)
|
||||
iso.3.6.1.4.1.2021.9.1.101.19 = STRING: "/mnt: less than 10% free (=
|
||||
0%)" // dskErrorMsg (A text description providing a warning and the
|
||||
space left on the disk.)
|
||||
|
||||
The cause of problem is that in btrfs free space may be less than
|
||||
total-used and by default check_snmp_storage checks used space which
|
||||
was in this case about 80% (with 0% available in the same time and OS
|
||||
was throwing OOS errors on write).
|
||||
|
||||
The solution is to configure warn/crit levels for %free not %used and
|
||||
use avail from dskTable because hrStorageTable does not provide this
|
||||
info (check_snmp_storage calculates free=total-used which is wrong for
|
||||
btrfs as above).
|
||||
|
||||
This patch works ok for us (this allows one to use new -u switch to use
|
||||
dskTable and its avail info instead of default hrStorageTable and its
|
||||
free=total-used calculation). This also adds a few spaces to plugin
|
||||
output for better message readability.
|
||||
---
|
||||
plugins/check_snmp_storage.pl | 145 ++++++++++++++++++++++++++--------
|
||||
1 file changed, 110 insertions(+), 35 deletions(-)
|
||||
|
||||
--- a/plugins/check_snmp_storage.pl
|
||||
+++ b/plugins/check_snmp_storage.pl
|
||||
@@ -19,13 +19,21 @@
|
||||
my %ERRORS = ('OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3, 'DEPENDENT' => 4);
|
||||
|
||||
# SNMP Datas
|
||||
-my $storage_table = '1.3.6.1.2.1.25.2.3.1';
|
||||
-my $storagetype_table = '1.3.6.1.2.1.25.2.3.1.2';
|
||||
-my $index_table = '1.3.6.1.2.1.25.2.3.1.1';
|
||||
-my $descr_table = '1.3.6.1.2.1.25.2.3.1.3';
|
||||
-my $size_table = '1.3.6.1.2.1.25.2.3.1.5.';
|
||||
-my $used_table = '1.3.6.1.2.1.25.2.3.1.6.';
|
||||
-my $alloc_units = '1.3.6.1.2.1.25.2.3.1.4.';
|
||||
+
|
||||
+my $hrStorageTable_storage_table = '1.3.6.1.2.1.25.2.3.1';
|
||||
+my $hrStorageTable_storagetype_table = '1.3.6.1.2.1.25.2.3.1.2';
|
||||
+my $hrStorageTable_index_table = '1.3.6.1.2.1.25.2.3.1.1';
|
||||
+my $hrStorageTable_descr_table = '1.3.6.1.2.1.25.2.3.1.3';
|
||||
+my $hrStorageTable_size_table = '1.3.6.1.2.1.25.2.3.1.5.';
|
||||
+my $hrStorageTable_used_table = '1.3.6.1.2.1.25.2.3.1.6.';
|
||||
+my $hrStorageTable_alloc_units = '1.3.6.1.2.1.25.2.3.1.4.';
|
||||
+
|
||||
+my $dskTable_storage_table = '1.3.6.1.4.1.2021.9.1';
|
||||
+my $dskTable_index_table = '1.3.6.1.4.1.2021.9.1.1';
|
||||
+my $dskTable_descr_table = '1.3.6.1.4.1.2021.9.1.2';
|
||||
+my $dskTable_size_table = '1.3.6.1.4.1.2021.9.1.6.';
|
||||
+my $dskTable_avail_table = '1.3.6.1.4.1.2021.9.1.7.';
|
||||
+my $dskTable_used_table = '1.3.6.1.4.1.2021.9.1.8.';
|
||||
|
||||
#Storage types definition - from /usr/share/snmp/mibs/HOST-RESOURCES-TYPES.txt
|
||||
my %hrStorage;
|
||||
@@ -80,6 +88,8 @@
|
||||
my @o_shortL = undef; # output type,where,cut
|
||||
my $o_reserve = 0; # % reserved blocks (A. Greiner-B\ufffdr patch)
|
||||
my $o_giga = undef; # output and levels in gigabytes instead of megabytes
|
||||
+my $o_dsktable = undef; # use dskTable instead of default hrStorageTable
|
||||
+
|
||||
|
||||
# SNMPv3 specific
|
||||
my $o_login = undef; # Login for snmpv3
|
||||
@@ -99,7 +109,7 @@
|
||||
|
||||
sub print_usage {
|
||||
print
|
||||
-"Usage: $Name [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-O] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]\n";
|
||||
+"Usage: $Name [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] [-u] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-O] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]\n";
|
||||
}
|
||||
|
||||
sub round ($$) {
|
||||
@@ -145,13 +155,13 @@
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
- Login and auth password for snmpv3 authentication
|
||||
- If no priv password exists, implies AuthNoPriv
|
||||
+ Login and auth password for snmpv3 authentication
|
||||
+ If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
- <privproto> : Priv protocole (des|aes : default des)
|
||||
+ <privproto> : Priv protocole (des|aes : default des)
|
||||
-x, --passwd=PASSWD
|
||||
Password for snmpv3 authentication
|
||||
-p, --port=PORT
|
||||
@@ -162,6 +172,8 @@
|
||||
'udp/ipv6' : UDP over IPv6
|
||||
'tcp/ipv4' : TCP over IPv4
|
||||
'tcp/ipv6' : TCP over IPv6
|
||||
+-u, --dsktable
|
||||
+ use dskTable instead of default hrStorageTable; cannot be used with -q
|
||||
-m, --name=NAME
|
||||
Name in description OID (can be mounpoints '/home' or 'Swap Space'...)
|
||||
This is treated as a regexp : -m /var will match /var , /var/log, /opt/var ...
|
||||
@@ -190,10 +202,10 @@
|
||||
bu : calculate MegaBytes used
|
||||
-w, --warn=INTEGER
|
||||
percent / MB of disk used to generate WARNING state
|
||||
- you can add the % sign
|
||||
+ you can add the % sign
|
||||
-c, --critical=INTEGER
|
||||
percent / MB of disk used to generate CRITICAL state
|
||||
- you can add the % sign
|
||||
+ you can add the % sign
|
||||
-R, --reserved=INTEGER
|
||||
% reserved blocks for superuser
|
||||
For ext2/3 filesystems, it is 5% by default
|
||||
@@ -205,29 +217,29 @@
|
||||
<type>: Make the output shorter :
|
||||
0 : only print the global result except the disk in warning or critical
|
||||
ex: "< 80% : OK"
|
||||
- 1 : Don't print all info for every disk
|
||||
+ 1 : Don't print all info for every disk
|
||||
ex : "/ : 66 %used (< 80) : OK"
|
||||
<where>: (optional) if = 1, put the OK/WARN/CRIT at the beginning
|
||||
<cut>: take the <n> first caracters or <n> last if n<0
|
||||
-o, --octetlength=INTEGER
|
||||
max-size of the SNMP message, usefull in case of Too Long responses.
|
||||
Be carefull with network filters. Range 484 - 65535, default are
|
||||
- usually 1472,1452,1460 or 1440.
|
||||
+ usually 1472,1452,1460 or 1440.
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
-Note :
|
||||
+Note :
|
||||
with T=pu or T=bu : OK < warn < crit
|
||||
with T=pl ot T=bl : crit < warn < OK
|
||||
-
|
||||
+
|
||||
If multiple storage are selected, the worse condition will be returned
|
||||
i.e if one disk is critical, the return is critical
|
||||
-
|
||||
- example :
|
||||
- Browse storage list : <script> -C <community> -H <host> -m <anything> -w 1 -c 2 -v
|
||||
- the -m option allows regexp in perl format :
|
||||
- Test drive C,F,G,H,I on Windows : -m ^[CFGHI]:
|
||||
+
|
||||
+ example :
|
||||
+ Browse storage list : <script> -C <community> -H <host> -m <anything> -w 1 -c 2 -v
|
||||
+ the -m option allows regexp in perl format :
|
||||
+ Test drive C,F,G,H,I on Windows : -m ^[CFGHI]:
|
||||
Test all mounts containing /var : -m /var
|
||||
Test all mounts under /var : -m ^/var
|
||||
Test only /var : -m /var -r
|
||||
@@ -270,6 +282,8 @@
|
||||
'warn:s' => \$o_warn,
|
||||
't:i' => \$o_timeout,
|
||||
'timeout:i' => \$o_timeout,
|
||||
+ 'u' => \$o_dsktable,
|
||||
+ 'dsktable64' => \$o_dsktable,
|
||||
'm:s' => \$o_descr,
|
||||
'name:s' => \$o_descr,
|
||||
'T:s' => \$o_type,
|
||||
@@ -404,6 +418,14 @@
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
+
|
||||
+ # disallow using -u and -q together
|
||||
+ if (defined($o_dsktable) && defined($o_storagetype)) {
|
||||
+ print "Parameters -u and -q cannot be used together!\n";
|
||||
+ print_usage();
|
||||
+ exit $ERRORS{"UNKNOWN"}
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
########## MAIN #######
|
||||
@@ -507,6 +529,30 @@
|
||||
my $resultat = undef;
|
||||
my $stype = undef;
|
||||
|
||||
+my $storage_table;
|
||||
+my $index_table;
|
||||
+my $descr_table;
|
||||
+my $size_table;
|
||||
+my $used_table;
|
||||
+my $alloc_units;
|
||||
+
|
||||
+if (defined($o_dsktable)) {
|
||||
+ $storage_table = $dskTable_storage_table;
|
||||
+ $index_table = $dskTable_index_table;
|
||||
+ $descr_table = $dskTable_descr_table;
|
||||
+ $size_table = $dskTable_size_table;
|
||||
+ $used_table = $dskTable_used_table;
|
||||
+ $alloc_units = 'dummy';
|
||||
+}
|
||||
+else {
|
||||
+ $storage_table = $hrStorageTable_storage_table;
|
||||
+ $index_table = $hrStorageTable_index_table;
|
||||
+ $descr_table = $hrStorageTable_descr_table;
|
||||
+ $size_table = $hrStorageTable_size_table;
|
||||
+ $used_table = $hrStorageTable_used_table;
|
||||
+ $alloc_units = $hrStorageTable_alloc_units;
|
||||
+}
|
||||
+
|
||||
# Get rid of UTF8 translation in case of accentuated caracters (thanks to Dimo Velev).
|
||||
$session->translate(Net::SNMP->TRANSLATE_NONE);
|
||||
if (defined($o_index)) {
|
||||
@@ -526,9 +572,9 @@
|
||||
#get storage typetable for reference
|
||||
if (defined($o_storagetype)) {
|
||||
if (version->parse(Net::SNMP->VERSION) < 4) {
|
||||
- $stype = $session->get_table($storagetype_table);
|
||||
+ $stype = $session->get_table($hrStorageTable_storagetype_table);
|
||||
} else {
|
||||
- $stype = $session->get_table(Baseoid => $storagetype_table);
|
||||
+ $stype = $session->get_table(Baseoid => $hrStorageTable_storagetype_table);
|
||||
}
|
||||
}
|
||||
if (!defined($resultat) | (!defined($stype) && defined($o_storagetype))) {
|
||||
@@ -573,7 +619,7 @@
|
||||
|
||||
# Check if storage type is OK
|
||||
if (defined($o_storagetype)) {
|
||||
- my ($skey) = $storagetype_table . "." . $tindex[$num_int];
|
||||
+ my ($skey) = $hrStorageTable_storagetype_table . "." . $tindex[$num_int];
|
||||
verb(" OID : $skey, Storagetype: $hrStorage{$$stype{$skey}} ?= $o_storagetype");
|
||||
if ($hrStorage{ $$stype{$skey} } !~ $o_storagetype) {
|
||||
$test = undef;
|
||||
@@ -587,7 +633,12 @@
|
||||
# put the oid in an array
|
||||
$oids[$count_oid++] = $size_table . $tindex[$num_int];
|
||||
$oids[$count_oid++] = $used_table . $tindex[$num_int];
|
||||
- $oids[$count_oid++] = $alloc_units . $tindex[$num_int];
|
||||
+ if (!defined($o_dsktable)) {
|
||||
+ $oids[$count_oid++] = $alloc_units . $tindex[$num_int];
|
||||
+ }
|
||||
+ else {
|
||||
+ $oids[$count_oid++] = $dskTable_avail_table . $tindex[$num_int];
|
||||
+ }
|
||||
|
||||
verb(" Name : $descr[$num_int], Index : $tindex[$num_int]");
|
||||
$num_int++;
|
||||
@@ -635,9 +686,17 @@
|
||||
# Only a few ms left...
|
||||
alarm(0);
|
||||
|
||||
+# dskTable use fixed 1kB unit
|
||||
+if (defined($o_dsktable)) {
|
||||
+ for (my $i = 0; $i < $num_int; $i++) {
|
||||
+ $$result{ $alloc_units . $tindex[$i] } = 1024;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
# Sum everything if -s and more than one storage
|
||||
if (defined($o_sum) && ($num_int > 1)) {
|
||||
verb("Adding all entries");
|
||||
+
|
||||
$$result{ $size_table . $tindex[0] } *= $$result{ $alloc_units . $tindex[0] };
|
||||
$$result{ $used_table . $tindex[0] } *= $$result{ $alloc_units . $tindex[0] };
|
||||
$$result{ $alloc_units . $tindex[0] } = 1;
|
||||
@@ -670,6 +729,9 @@
|
||||
verb("Size : $$result{$size_table . $tindex[$i]}");
|
||||
verb("Used : $$result{$used_table . $tindex[$i]}");
|
||||
verb("Alloc : $$result{$alloc_units . $tindex[$i]}");
|
||||
+ if (defined($o_dsktable)) {
|
||||
+ verb("Avail : $$result{$dskTable_avail_table . $tindex[$i]}");
|
||||
+ }
|
||||
|
||||
if ( !defined($$result{ $size_table . $tindex[$i] })
|
||||
|| !defined($$result{ $used_table . $tindex[$i] })
|
||||
@@ -691,12 +753,24 @@
|
||||
$pu = 0;
|
||||
}
|
||||
my $bu = $$result{ $used_table . $tindex[$i] } * $$result{ $alloc_units . $tindex[$i] } / $output_metric_val;
|
||||
- my $pl = 100 - $pu;
|
||||
- my $bl
|
||||
- = (
|
||||
- ($$result{ $size_table . $tindex[$i] } * ((100 - $o_reserve) / 100) - ($$result{ $used_table . $tindex[$i] }))
|
||||
- * $$result{ $alloc_units . $tindex[$i] }
|
||||
+
|
||||
+ # in dskTable mode get available storage from SNMP to avoid problems with filesystems like btrfs
|
||||
+ # where available may be 0 but size-used is still > 0
|
||||
+ my $pl;
|
||||
+ my $bl;
|
||||
+ if (defined($o_dsktable)) {
|
||||
+ $pl = $$result{ $dskTable_avail_table . $tindex[$i] } * 100
|
||||
+ / ($$result{ $size_table . $tindex[$i] } * (100 - $o_reserve) / 100);
|
||||
+ $bl = $$result{ $dskTable_avail_table . $tindex[$i] } * $$result{ $alloc_units . $tindex[$i] }
|
||||
+ / $output_metric_val;
|
||||
+ }
|
||||
+ else {
|
||||
+ $pl = 100 - $pu;
|
||||
+ $bl = (
|
||||
+ ($$result{ $size_table . $tindex[$i] } * ((100 - $o_reserve) / 100) - ($$result{ $used_table . $tindex[$i] }))
|
||||
+ * $$result{ $alloc_units . $tindex[$i] }
|
||||
/ $output_metric_val);
|
||||
+ }
|
||||
|
||||
# add a ' ' if some data exists in $perf_out
|
||||
$perf_out .= " " if (defined($perf_out));
|
||||
@@ -717,7 +791,7 @@
|
||||
|| (($pu >= $o_warn) && ($locstate = $warn_state = 1));
|
||||
if (defined($o_shortL[2])) { }
|
||||
if (!defined($o_shortL[0]) || ($locstate == 1)) { # print full output if warn or critical state
|
||||
- $output .= sprintf("%s: %.0f%%used(%.0f%sB/%.0f%sB) ", $descr[$i], $pu, $bu, $output_metric, $to,
|
||||
+ $output .= sprintf("%s: %.0f%% used (%.0f%sB/%.0f%sB) ", $descr[$i], $pu, $bu, $output_metric, $to,
|
||||
$output_metric);
|
||||
} elsif ($o_shortL[0] == 1) {
|
||||
$output .= sprintf("%s: %.0f%% ", $descr[$i], $pu);
|
||||
@@ -732,7 +806,7 @@
|
||||
|| (($bu >= $o_warn) && ($locstate = $warn_state = 1));
|
||||
if (!defined($o_shortL[0]) || ($locstate == 1)) { # print full output if warn or critical state
|
||||
$output
|
||||
- .= sprintf("%s: %.0f%sBused/%.0f%sB (%.0f%%) ", $descr[$i], $bu, $output_metric, $to, $output_metric,
|
||||
+ .= sprintf("%s: %.0f%sB used / %.0f%sB (%.0f%%) ", $descr[$i], $bu, $output_metric, $to, $output_metric,
|
||||
$pu);
|
||||
} elsif ($o_shortL[0] == 1) {
|
||||
$output .= sprintf("%s: %.0f%sB ", $descr[$i], $bu, $output_metric);
|
||||
@@ -747,7 +821,7 @@
|
||||
|| (($bl <= $o_warn) && ($locstate = $warn_state = 1));
|
||||
if (!defined($o_shortL[0]) || ($locstate == 1)) { # print full output if warn or critical state
|
||||
$output
|
||||
- .= sprintf("%s: %.0f%sBleft/%.0f%sB (%.0f%%) ", $descr[$i], $bl, $output_metric, $to, $output_metric,
|
||||
+ .= sprintf("%s: %.0f%sB left / %.0f%sB (%.0f%%) ", $descr[$i], $bl, $output_metric, $to, $output_metric,
|
||||
$pl);
|
||||
} elsif ($o_shortL[0] == 1) {
|
||||
$output .= sprintf("%s: %.0f%sB ", $descr[$i], $bl, $output_metric);
|
||||
@@ -761,7 +835,7 @@
|
||||
(($pl <= $o_crit) && ($locstate = $crit_state = 1))
|
||||
|| (($pl <= $o_warn) && ($locstate = $warn_state = 1));
|
||||
if (!defined($o_shortL[0]) || ($locstate == 1)) { # print full output if warn or critical state
|
||||
- $output .= sprintf("%s: %.0f%%left(%.0f%sB/%.0f%sB) ", $descr[$i], $pl, $bl, $output_metric, $to,
|
||||
+ $output .= sprintf("%s: %.0f%% left (%.0f%sB/%.0f%sB) ", $descr[$i], $pl, $bl, $output_metric, $to,
|
||||
$output_metric);
|
||||
} elsif ($o_shortL[0] == 1) {
|
||||
$output .= sprintf("%s: %.0f%% ", $descr[$i], $pl);
|
116
debian/patches/50_disable_epn
vendored
Normal file
116
debian/patches/50_disable_epn
vendored
Normal file
|
@ -0,0 +1,116 @@
|
|||
## 50_disable_epn by Jan Wagner <waja@cyconet.org>
|
||||
##
|
||||
## DP: leave marks to disable epn
|
||||
|
||||
--- a/plugins/check_snmp_boostedge.pl
|
||||
+++ b/plugins/check_snmp_boostedge.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_boostedge.pl #################
|
||||
# Version : 1.0
|
||||
# Date : Jan 16 2007
|
||||
--- a/plugins/check_snmp_cpfw.pl
|
||||
+++ b/plugins/check_snmp_cpfw.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_cpfw ##############
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
--- a/plugins/check_snmp_css_main.pl
|
||||
+++ b/plugins/check_snmp_css_main.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_css_main.pl #################
|
||||
# Version : 1.0
|
||||
# Date : 27 Sept 2006
|
||||
--- a/plugins/check_snmp_css.pl
|
||||
+++ b/plugins/check_snmp_css.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_css.pl #################
|
||||
# Version : 1.0.1
|
||||
# Date : 27 Sept 2006
|
||||
--- a/plugins/check_snmp_env.pl
|
||||
+++ b/plugins/check_snmp_env.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_env #################
|
||||
# Version : 1.3
|
||||
# Date : May 24 2007
|
||||
--- a/plugins/check_snmp_int.pl
|
||||
+++ b/plugins/check_snmp_int.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_int ##############
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
--- a/plugins/check_snmp_linkproof_nhr.pl
|
||||
+++ b/plugins/check_snmp_linkproof_nhr.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_linkproof_nhr #################
|
||||
# Version : 1.0
|
||||
# Date : Aug 24 2006
|
||||
--- a/plugins/check_snmp_load.pl
|
||||
+++ b/plugins/check_snmp_load.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_load #################
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
--- a/plugins/check_snmp_mem.pl
|
||||
+++ b/plugins/check_snmp_mem.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_mem ##############
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
--- a/plugins/check_snmp_nsbox.pl
|
||||
+++ b/plugins/check_snmp_nsbox.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_nsbox #################
|
||||
# Version : 1.0
|
||||
# Date : Jan 16 2007
|
||||
--- a/plugins/check_snmp_process.pl
|
||||
+++ b/plugins/check_snmp_process.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_process ##############
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
--- a/plugins/check_snmp_storage.pl
|
||||
+++ b/plugins/check_snmp_storage.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_storage ##############
|
||||
# Version : 1.3.3
|
||||
# Date : Jun 1 2007
|
||||
--- a/plugins/check_snmp_vrrp.pl
|
||||
+++ b/plugins/check_snmp_vrrp.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_vrrp ##############
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
--- a/plugins/check_snmp_win.pl
|
||||
+++ b/plugins/check_snmp_win.pl
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/perl -w
|
||||
+# nagios: -epn
|
||||
############################## check_snmp_win ##############
|
||||
my $VERSION = "2.1.0";
|
||||
|
394
debian/patches/51_fix_privacy_doc
vendored
Normal file
394
debian/patches/51_fix_privacy_doc
vendored
Normal file
|
@ -0,0 +1,394 @@
|
|||
## 51_fix_privacy_doc by Jan Wagner
|
||||
##
|
||||
## DP: Fixing potential privacy breach by fetching data from sourceforge.net
|
||||
|
||||
commit 084af86fe6ee55135144ac44f661ff139434fdc3
|
||||
Author: Jan Wagner <waja@cyconet.org>
|
||||
Date: Sun Mar 2 21:22:42 2014 +0100
|
||||
|
||||
Fix potential privacy breach of HTML documentation
|
||||
|
||||
--- a/doc/html/nagios.manubulon.com/faq.html
|
||||
+++ b/doc/html/nagios.manubulon.com/faq.html
|
||||
@@ -92,24 +92,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
-<script type="text/javascript"><!--
|
||||
-google_ad_client = "ca-pub-1303792821309694";
|
||||
-/* nagios */
|
||||
-google_ad_slot = "5986789334";
|
||||
-google_ad_width = 120;
|
||||
-google_ad_height = 600;
|
||||
-//-->
|
||||
-</script>
|
||||
-<script type="text/javascript"
|
||||
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||
-</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#FFFFFF">-----------</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
- <td><A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=3" width="110" height="37" border="0" alt="SourceForge.net Logo" /></A> </td>
|
||||
+ <td><A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Side Bar -->
|
||||
@@ -295,7 +284,7 @@
|
||||
<td>
|
||||
<p class="SectionBody">This project is also hosted by : <br>
|
||||
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp/"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp/">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
</p></td>
|
||||
</tr>
|
||||
|
||||
--- a/doc/html/nagios.manubulon.com/index_commands.html
|
||||
+++ b/doc/html/nagios.manubulon.com/index_commands.html
|
||||
@@ -87,24 +87,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
-<script type="text/javascript"><!--
|
||||
-google_ad_client = "ca-pub-1303792821309694";
|
||||
-/* nagios */
|
||||
-google_ad_slot = "5986789334";
|
||||
-google_ad_width = 120;
|
||||
-google_ad_height = 600;
|
||||
-//-->
|
||||
-</script>
|
||||
-<script type="text/javascript"
|
||||
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||
-</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#FFFFFF">-----------</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
- <td><A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=3" width="110" height="37" border="0" alt="SourceForge.net Logo" /></A> </td>
|
||||
+ <td><A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Side Bar -->
|
||||
@@ -2004,7 +1993,7 @@
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
|
||||
</p>
|
||||
|
||||
--- a/doc/html/nagios.manubulon.com/snmp_cpfw.html
|
||||
+++ b/doc/html/nagios.manubulon.com/snmp_cpfw.html
|
||||
@@ -439,7 +439,7 @@
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
|
||||
</p>
|
||||
|
||||
--- a/doc/html/nagios.manubulon.com/snmp_css.html
|
||||
+++ b/doc/html/nagios.manubulon.com/snmp_css.html
|
||||
@@ -353,7 +353,7 @@
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
|
||||
</p>
|
||||
|
||||
--- a/doc/html/nagios.manubulon.com/snmp_env.html
|
||||
+++ b/doc/html/nagios.manubulon.com/snmp_env.html
|
||||
@@ -342,7 +342,7 @@
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
|
||||
</p>
|
||||
|
||||
--- a/doc/html/nagios.manubulon.com/snmp_int.html
|
||||
+++ b/doc/html/nagios.manubulon.com/snmp_int.html
|
||||
@@ -116,24 +116,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
-<script type="text/javascript"><!--
|
||||
-google_ad_client = "ca-pub-1303792821309694";
|
||||
-/* nagios */
|
||||
-google_ad_slot = "5986789334";
|
||||
-google_ad_width = 120;
|
||||
-google_ad_height = 600;
|
||||
-//-->
|
||||
-</script>
|
||||
-<script type="text/javascript"
|
||||
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||
-</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#FFFFFF">-----------</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
- <td><A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=3" width="110" height="37" border="0" alt="SourceForge.net Logo" /></A> </td>
|
||||
+ <td><A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Side Bar -->
|
||||
@@ -687,7 +676,7 @@
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
|
||||
</p>
|
||||
|
||||
--- a/doc/html/nagios.manubulon.com/snmp_load.html
|
||||
+++ b/doc/html/nagios.manubulon.com/snmp_load.html
|
||||
@@ -379,7 +379,7 @@
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
|
||||
</p>
|
||||
|
||||
--- a/doc/html/nagios.manubulon.com/snmp_mem.html
|
||||
+++ b/doc/html/nagios.manubulon.com/snmp_mem.html
|
||||
@@ -457,7 +457,7 @@
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
|
||||
</p>
|
||||
|
||||
--- a/doc/html/nagios.manubulon.com/snmp_process.html
|
||||
+++ b/doc/html/nagios.manubulon.com/snmp_process.html
|
||||
@@ -355,7 +355,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
</p>
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
trademarks of Ethan Galstad.</p>
|
||||
--- a/doc/html/nagios.manubulon.com/snmp_storage.html
|
||||
+++ b/doc/html/nagios.manubulon.com/snmp_storage.html
|
||||
@@ -175,24 +175,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
-<script type="text/javascript"><!--
|
||||
-google_ad_client = "ca-pub-1303792821309694";
|
||||
-/* nagios */
|
||||
-google_ad_slot = "5986789334";
|
||||
-google_ad_width = 120;
|
||||
-google_ad_height = 600;
|
||||
-//-->
|
||||
-</script>
|
||||
-<script type="text/javascript"
|
||||
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||
-</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#FFFFFF">-----------</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
- <td><A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=3" width="110" height="37" border="0" alt="SourceForge.net Logo" /></A> </td>
|
||||
+ <td><A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Side Bar -->
|
||||
@@ -1278,7 +1267,7 @@
|
||||
|
||||
|
||||
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
|
||||
|
||||
|
||||
--- a/doc/html/nagios.manubulon.com/snmp_vrrp.html
|
||||
+++ b/doc/html/nagios.manubulon.com/snmp_vrrp.html
|
||||
@@ -94,24 +94,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
-<script type="text/javascript"><!--
|
||||
-google_ad_client = "ca-pub-1303792821309694";
|
||||
-/* nagios */
|
||||
-google_ad_slot = "5986789334";
|
||||
-google_ad_width = 120;
|
||||
-google_ad_height = 600;
|
||||
-//-->
|
||||
-</script>
|
||||
-<script type="text/javascript"
|
||||
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||
-</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#FFFFFF">-----------</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
- <td><A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=3" width="110" height="37" border="0" alt="SourceForge.net Logo" /></A> </td>
|
||||
+ <td><A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Side Bar -->
|
||||
@@ -348,7 +337,7 @@
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
|
||||
</p>
|
||||
|
||||
--- a/doc/html/nagios.manubulon.com/snmp_windows.html
|
||||
+++ b/doc/html/nagios.manubulon.com/snmp_windows.html
|
||||
@@ -243,7 +243,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
</p>
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
trademarks of Ethan Galstad.</p>
|
||||
--- a/doc/html/nagios.manubulon.com/index.html
|
||||
+++ b/doc/html/nagios.manubulon.com/index.html
|
||||
@@ -88,24 +88,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
-<script type="text/javascript"><!--
|
||||
-google_ad_client = "ca-pub-1303792821309694";
|
||||
-/* nagios */
|
||||
-google_ad_slot = "5986789334";
|
||||
-google_ad_width = 120;
|
||||
-google_ad_height = 600;
|
||||
-//-->
|
||||
-</script>
|
||||
-<script type="text/javascript"
|
||||
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||
-</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#FFFFFF">-----------</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
- <td><A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=3" width="110" height="37" border="0" alt="SourceForge.net Logo" /></A> </td>
|
||||
+ <td><A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Side Bar -->
|
||||
@@ -339,7 +328,7 @@
|
||||
<tr>
|
||||
<td><p class="SectionBody">All code here is under GPL licence. </p>
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A> </p></td>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</p></td>
|
||||
<td><p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
trademarks of Ethan Galstad.</p></td>
|
||||
</tr>
|
||||
--- a/doc/html/nagios.manubulon.com/index_info.html
|
||||
+++ b/doc/html/nagios.manubulon.com/index_info.html
|
||||
@@ -86,24 +86,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
-<script type="text/javascript"><!--
|
||||
-google_ad_client = "ca-pub-1303792821309694";
|
||||
-/* nagios */
|
||||
-google_ad_slot = "5986789334";
|
||||
-google_ad_width = 120;
|
||||
-google_ad_height = 600;
|
||||
-//-->
|
||||
-</script>
|
||||
-<script type="text/javascript"
|
||||
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||
-</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#FFFFFF">-----------</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
- <td><A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=3" width="110" height="37" border="0" alt="SourceForge.net Logo" /></A> </td>
|
||||
+ <td><A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Side Bar -->
|
||||
@@ -588,7 +577,7 @@
|
||||
<td>
|
||||
<hr>
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
</p>
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
trademarks of Ethan Galstad.</p>
|
||||
--- a/doc/html/nagios.manubulon.com/index_snmp.html
|
||||
+++ b/doc/html/nagios.manubulon.com/index_snmp.html
|
||||
@@ -86,24 +86,13 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
-<script type="text/javascript"><!--
|
||||
-google_ad_client = "ca-pub-1303792821309694";
|
||||
-/* nagios */
|
||||
-google_ad_slot = "5986789334";
|
||||
-google_ad_width = 120;
|
||||
-google_ad_height = 600;
|
||||
-//-->
|
||||
-</script>
|
||||
-<script type="text/javascript"
|
||||
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||
-</script>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#FFFFFF">-----------</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
- <td><A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=3" width="110" height="37" border="0" alt="SourceForge.net Logo" /></A> </td>
|
||||
+ <td><A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Side Bar -->
|
||||
@@ -437,7 +426,7 @@
|
||||
<td>
|
||||
<hr>
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
</p>
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
trademarks of Ethan Galstad.</p>
|
||||
--- a/doc/html/nagios.manubulon.com/package_c.html
|
||||
+++ b/doc/html/nagios.manubulon.com/package_c.html
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
- <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
+ <A href="http://sourceforge.net/projects/nagios-snmp">http://sourceforge.net/projects/nagios-snmp</A>
|
||||
|
||||
</p>
|
||||
|
15
debian/patches/series
vendored
Normal file
15
debian/patches/series
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
10_check_snmp_storage_error_handling
|
||||
11_check_snmp_int_agent_workaround
|
||||
12_check_snmp_mem_perf
|
||||
13_check_snmp_process_new_features
|
||||
14_check_snmp_int_ign
|
||||
15_check_snmp_int_spaces
|
||||
16_check_snmp_win_max_message_size
|
||||
17_check_snmp_storage_okifempty
|
||||
18_check_snmp_int_fix_perf_out
|
||||
19_check_snmp_int_remove_unneeded_my
|
||||
20_check_snmp_int_avaid_huge_amount_of_regex
|
||||
21_check_snmp_load_update_fortiswitch_and_fortigate4.3
|
||||
22_check_snmp_storage_fix_space_btrfs
|
||||
50_disable_epn
|
||||
51_fix_privacy_doc
|
8
debian/pluginconfig/snmp_cpfw.cfg
vendored
Normal file
8
debian/pluginconfig/snmp_cpfw.cfg
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
# check point firewall template, for more info see:
|
||||
# http://www.manubulon.com/nagios/index_commands.html#cpfw
|
||||
|
||||
# 'check_snmp_cpfw_v3' command definition
|
||||
define command {
|
||||
command_name check_snmp_cpfw_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_cpfw.pl -H $HOSTADDRESS$ $USER9$ $ARG1$
|
||||
}
|
20
debian/pluginconfig/snmp_env.cfg
vendored
Normal file
20
debian/pluginconfig/snmp_env.cfg
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# system environment check template, for more see:
|
||||
# http://www.manubulon.com/nagios/index_commands.html#env
|
||||
|
||||
# 'check_snmp_env_v1' command definition
|
||||
define command {
|
||||
command_name check_snmp_env_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_env.pl -H $HOSTADDRESS$ -C $ARG3$ -T $ARG1$ $ARG2$
|
||||
}
|
||||
|
||||
# 'check_snmp_env_v2' command definition
|
||||
define command {
|
||||
command_name check_snmp_env_v2
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_env.pl -H $HOSTADDRESS$ -C $ARG3$ -2 -T $ARG1$ $ARG2$
|
||||
}
|
||||
|
||||
# 'check_snmp_env_v3' command definition
|
||||
define command {
|
||||
command_name check_snmp_env_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_env.pl -H $HOSTADDRESS$ $USER9$ -T $ARG1$ $ARG2$
|
||||
}
|
20
debian/pluginconfig/snmp_int.cfg
vendored
Normal file
20
debian/pluginconfig/snmp_int.cfg
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# (network-) interface check template, for more see:
|
||||
# http://www.manubulon.com/nagios/index_commands.html#interface
|
||||
|
||||
# 'check_snmp_int_v1' command definition
|
||||
define command {
|
||||
command_name check_snmp_int_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_int.pl -H $HOSTADDRESS$ -C $ARG3$ -n $ARG1$ -B$ARG4$ $ARG2$
|
||||
}
|
||||
|
||||
# 'check_snmp_int_v2' command definition
|
||||
define command {
|
||||
command_name check_snmp_int_v2
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_int.pl -H $HOSTADDRESS$ -C $ARG3$ -2 -n $ARG1$ -B$ARG4$ $ARG2$
|
||||
}
|
||||
|
||||
# 'check_snmp_int_v3' command definition
|
||||
define command {
|
||||
command_name check_snmp_int_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_int.pl -H $HOSTADDRESS$ $USER9$ -n $ARG1$ -B$ARG4$ $ARG2$
|
||||
}
|
20
debian/pluginconfig/snmp_load.cfg
vendored
Normal file
20
debian/pluginconfig/snmp_load.cfg
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# system load check template, for more see:
|
||||
# http://www.manubulon.com/nagios/index_commands.html#load
|
||||
|
||||
# 'check_snmp_load_v1' command definition
|
||||
define command {
|
||||
command_name check_snmp_load_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_load.pl -H $HOSTADDRESS$ -C $ARG5$ -T $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
# 'check_snmp_load_v2' command definition
|
||||
define command {
|
||||
command_name check_snmp_load_v2
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_load.pl -H $HOSTADDRESS$ -C $ARG5$ -2 -T $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
# 'check_snmp_load_v3' command definition
|
||||
define command {
|
||||
command_name check_snmp_load_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_load.pl -H $HOSTADDRESS$ $USER9$ -T $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
20
debian/pluginconfig/snmp_mem.cfg
vendored
Normal file
20
debian/pluginconfig/snmp_mem.cfg
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# system memory check template, for more see:
|
||||
# http://www.manubulon.com/nagios/index_commands.html#mem
|
||||
|
||||
# 'check_snmp_mem_v1' command definition
|
||||
define command {
|
||||
command_name check_snmp_mem_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_mem.pl -H $HOSTADDRESS$ -C $ARG5$ $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
# 'check_snmp_mem_v2' command definition
|
||||
define command {
|
||||
command_name check_snmp_mem_v2
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_mem.pl -H $HOSTADDRESS$ -C $ARG5$ -2 $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
# 'check_snmp_mem_v3' command definition
|
||||
define command {
|
||||
command_name check_snmp_mem_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_mem.pl -H $HOSTADDRESS$ $USER9$ $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
15
debian/pluginconfig/snmp_process.cfg
vendored
Normal file
15
debian/pluginconfig/snmp_process.cfg
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
# system process check template, for more see:
|
||||
# http://www.manubulon.com/nagios/index_commands.html#process
|
||||
|
||||
# 'check_snmp_process_v1' command definition
|
||||
define command {
|
||||
command_name check_snmp_process_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_process.pl -H $HOSTADDRESS$ -C $ARG5$ -n $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
# 'check_snmp_process_v2' command definition
|
||||
define command {
|
||||
command_name check_snmp_process_v2
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_process.pl -H $HOSTADDRESS$ -C $ARG5$ -2 -n $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
20
debian/pluginconfig/snmp_storage.cfg
vendored
Normal file
20
debian/pluginconfig/snmp_storage.cfg
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# system storage check template, for more see:
|
||||
# http://www.manubulon.com/nagios/index_commands.html#storage
|
||||
|
||||
# 'check_snmp_storage_v1' command definition
|
||||
define command {
|
||||
command_name check_snmp_storage_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_storage.pl -H $HOSTADDRESS$ -C $ARG5$ -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
# 'check_snmp_storage_v2' command definition
|
||||
define command {
|
||||
command_name check_snmp_storage_v2
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_storage.pl -H $HOSTADDRESS$ -C $ARG5$ -2 -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
||||
|
||||
# 'check_snmp_storage_v3' command definition
|
||||
define command {
|
||||
command_name check_snmp_storage_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_storage.pl -H $HOSTADDRESS$ $USER9$ -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$
|
||||
}
|
20
debian/pluginconfig/snmp_vrrp.cfg
vendored
Normal file
20
debian/pluginconfig/snmp_vrrp.cfg
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# vrrp check template, for more see:
|
||||
# http://www.manubulon.com/nagios/index_commands.html#vrrp
|
||||
|
||||
# 'check_snmp_vrrp_v1' command definition
|
||||
define command {
|
||||
command_name check_snmp_vrrp_v1
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_vrrp.pl -H $HOSTADDRESS$ -C $ARG3$ -T $ARG1$ -s $ARG2$
|
||||
}
|
||||
|
||||
# 'check_snmp_vrrp_v2' command definition
|
||||
define command {
|
||||
command_name check_snmp_vrrp_v2
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_vrrp.pl -H $HOSTADDRESS$ -C $ARG3$ -2 -T $ARG1$ -s $ARG2$
|
||||
}
|
||||
|
||||
# 'check_snmp_vrrp_v3' command definition
|
||||
define command {
|
||||
command_name check_snmp_vrrp_v3
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_vrrp.pl -H $HOSTADDRESS$ $USER9$ -T $ARG1$ -s $ARG2$
|
||||
}
|
8
debian/pluginconfig/snmp_win.cfg
vendored
Normal file
8
debian/pluginconfig/snmp_win.cfg
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
# windows check template, for more see:
|
||||
# http://www.manubulon.com/nagios/index_commands.html#windows
|
||||
|
||||
# 'check_win' command definition
|
||||
define command {
|
||||
command_name check_win
|
||||
command_line /usr/lib/nagios/plugins/check_snmp_win.pl -H $HOSTADDRESS$ -C $ARG3$ -n $ARG2$
|
||||
}
|
29
debian/postinst
vendored
Normal file
29
debian/postinst
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
templdir=/usr/share/nagios-snmp-plugins/pluginconfig
|
||||
|
||||
if [ "$1" = "configure" ]; then
|
||||
if [ -f /usr/share/monitoring-plugins/dpkg/functions ]; then
|
||||
# only working with monitoring-plugins-basic
|
||||
. /usr/share/monitoring-plugins/dpkg/functions
|
||||
register_cfgs $2
|
||||
elif [ -f /usr/share/nagios-plugins/dpkg/functions ]; then
|
||||
# only working with nagios-plugins-basic (>= 1.4.5-2)
|
||||
. /usr/share/nagios-plugins/dpkg/functions
|
||||
register_cfgs $2
|
||||
else
|
||||
# to get working with etch
|
||||
(
|
||||
cd $templdir
|
||||
for f in *cfg; do
|
||||
ucf $f /etc/nagios-plugins/config/$f
|
||||
done
|
||||
);
|
||||
fi
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
21
debian/postrm.in
vendored
Normal file
21
debian/postrm.in
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
PLUGINS="@PLUGINS@"
|
||||
|
||||
if [ "$1" = "purge" ]; then
|
||||
if which ucf >/dev/null 2>&1; then
|
||||
have_ucf="yes"
|
||||
fi
|
||||
for f in $PLUGINS; do
|
||||
rm -f /etc/nagios-plugins/config/${f}.cfg
|
||||
if [ "$have_ucf" = "yes" ]; then
|
||||
ucf --purge /etc/nagios-plugins/config/${f}.cfg
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
72
debian/rules
vendored
Executable file
72
debian/rules
vendored
Executable file
|
@ -0,0 +1,72 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
COMMANDDEFPATH:=/etc/nagios-plugins/config/
|
||||
NP_DIR:=debian/nagios-snmp-plugins
|
||||
NP_TEMPLATES:=$(NP_DIR)/usr/share/nagios-snmp-plugins/pluginconfig
|
||||
NP_LIBEXEC:=/usr/lib/nagios/plugins
|
||||
|
||||
plugin_cfgs:=snmp_cpfw snmp_env snmp_int snmp_load snmp_mem snmp_process \
|
||||
snmp_storage snmp_vrrp snmp_win
|
||||
|
||||
build: build-arch build-indep
|
||||
build-arch: build-stamp
|
||||
build-indep: build-stamp
|
||||
build-stamp:
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
|
||||
dh_clean
|
||||
-rm -f debian/postrm
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/nagios-snmp-plugins.
|
||||
for PLUGINS in plugins/*.pl; \
|
||||
do \
|
||||
install -D -m 0755 $$PLUGINS $(NP_DIR)$(NP_LIBEXEC)/`basename $$PLUGINS` || exit 1; \
|
||||
sed -i "s#/usr/local/icinga/libexec#$(NP_LIBEXEC)#" $(NP_DIR)$(NP_LIBEXEC)/`basename $$PLUGINS` || exit 1; \
|
||||
done
|
||||
# copying templates them into seperate "template" directories outside of
|
||||
# /usr/share/doc for ucf to use.
|
||||
install -d $(NP_DIR)/usr/share/nagios-snmp-plugins/pluginconfig
|
||||
for c in ${plugin_cfgs}; do \
|
||||
cp debian/pluginconfig/$${c}.cfg ${NP_TEMPLATES}; \
|
||||
done
|
||||
# here the list of config templates are writen to postrm
|
||||
sed -e 's/@PLUGINS@/${plugin_cfgs}/' \
|
||||
< debian/postrm.in \
|
||||
> debian/postrm
|
||||
# copy html documentation over
|
||||
install -d $(NP_DIR)/usr/share/doc/nagios-snmp-plugins/html/
|
||||
cp -r doc/html/nagios.manubulon.com/* $(NP_DIR)/usr/share/doc/nagios-snmp-plugins/html/
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs
|
||||
dh_installdocs
|
||||
dh_link
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
dh_perl
|
||||
dh_installdeb
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
# We have nothing to do for now.
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
1
debian/source/options
vendored
Normal file
1
debian/source/options
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
extend-diff-ignore = '(^|/)(\.travis\.yml|\.git|\.github|\.gitgnore|config\.sub|config\.guess)'
|
5
debian/upstream/metadata
vendored
Normal file
5
debian/upstream/metadata
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
Bug-Database: https://github.com/SteScho/manubulon-snmp/issues
|
||||
Bug-Submit: https://github.com/SteScho/manubulon-snmp/issues/new
|
||||
Repository: https://github.com/SteScho/manubulon-snmp.git
|
||||
Repository-Browse: https://github.com/SteScho/manubulon-snmp
|
3
debian/watch
vendored
Normal file
3
debian/watch
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
version=4
|
||||
opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/nagios-snmp-plugins-$1\.tar\.gz/,uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1-$2/ \
|
||||
https://github.com/SteScho/manubulon-snmp/tags .*/v?(\d\S*)\.tar\.gz
|
30
doc/01-About.md
Normal file
30
doc/01-About.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
# About Manubulon SNMP Plugins <a href="manubulon-snmp-plugins-about"></a>
|
||||
|
||||
Manubulon SNMP plugins is a set of Icinga/Nagios plugins
|
||||
to check hosts/devices using the SNMP protocol.
|
||||
|
||||
Please find more insights in the following chapters:
|
||||
|
||||
* [Installation](02-Installation.md)
|
||||
* [Configuration](03-Configuration.md)
|
||||
* [Plugins](04-Plugins.md)
|
||||
|
||||
|
||||
|
||||
## History <a href="manubulon-snmp-plugins-about-history"></a>
|
||||
|
||||
These plugins have been written by Patrick Proy several years ago.
|
||||
|
||||
Many community members still use them, but development and patches
|
||||
stopped.
|
||||
|
||||
I've used these plugins in my previous job, and decided to fork them
|
||||
into this repository. Many patches have been applied, and put into
|
||||
official releases for packagers.
|
||||
|
||||
This is reflected by moving each plugin into a v2.x version although
|
||||
there are not so many changes.
|
||||
|
||||
I don't have a test system/hardware nor do much with these plugins these days.
|
||||
Still this repository allows community members to send in their patches
|
||||
and discuss bugs and feature requests.
|
56
doc/02-Installation.md
Normal file
56
doc/02-Installation.md
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Manubulon SNMP Plugins Installation <a href="manubulon-snmp-plugins-installation"></a>
|
||||
|
||||
The plugins rely on the `Net::SNMP` Perl library for fetching
|
||||
data from SNMP enabled hosts.
|
||||
|
||||
## Prerequisites <a href="manubulon-snmp-plugins-installation-required-prerequisites"></a>
|
||||
|
||||
### RHEL/CentOS EPEL Repository <a href="manubulon-snmp-plugins-installation-epel"></a>
|
||||
|
||||
RHEL/CentOS requires the EPEL repository:
|
||||
|
||||
```
|
||||
yum -y install epel-release
|
||||
yum makecache
|
||||
```
|
||||
|
||||
If you are using RHEL you need enable the `optional` repository and then install
|
||||
the [EPEL rpm package](https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F).
|
||||
|
||||
## Perl Dependencies <a href="manubulon-snmp-plugins-installation-perl-dependencies"></a>
|
||||
|
||||
Debian/Ubuntu:
|
||||
|
||||
```
|
||||
apt-get -y install libnet-snmp-perl libcrypt-des-perl libcrypt-rijndael-perl libdigest-hmac-perl
|
||||
```
|
||||
|
||||
RHEL/CentOS/Fedora:
|
||||
|
||||
```
|
||||
yum -y install perl-Net-SNMP perl-Getopt-Long perl-Crypt-DES perl-Crypt-Rijndael perl-Digest-HMAC
|
||||
```
|
||||
|
||||
## Plugin Setup <a href="manubulon-snmp-plugins-installation-plugins"></a>
|
||||
|
||||
Debian/Ubuntu:
|
||||
|
||||
```
|
||||
install -o root -g root -m750 plugins/*.pl /usr/lib/nagios/plugins/
|
||||
```
|
||||
RHEL/CentOS/Fedora:
|
||||
|
||||
```
|
||||
install -o root -g root -m750 plugins/*.pl /usr/lib64/nagios/plugins/
|
||||
```
|
||||
|
||||
Proceed with inspecting the plugins `--help` parameter in [this chapter](04-Plugins.md).
|
||||
|
||||
Next up: Integrate the plugins into your monitoring by adding [configuration](03-Configuration.md).
|
||||
|
||||
## Advanced Hints <a href="manubulon-snmp-plugins-installation-advanced"></a>
|
||||
|
||||
Perl, default directory and temp files location can be changed using the install.sh script.
|
||||
|
||||
`utils.pm` from `Monitoring::Plugin::Perl` is no longer required.
|
||||
|
104
doc/03-Configuration.md
Normal file
104
doc/03-Configuration.md
Normal file
|
@ -0,0 +1,104 @@
|
|||
# Manubulon SNMP Plugins Configuration <a href="manubulon-snmp-plugins-configuration"></a>
|
||||
|
||||
Each plugin requires a command definition which defines the command line parameters
|
||||
and arguments passed from service checks.
|
||||
|
||||
* [Icinga 2](03-Configuration.md#manubulon-snmp-plugins-configuration-icinga-2) integration
|
||||
* [Icinga 1.x/Naemon/Nagios](03-Configuration.md#manubulon-snmp-plugins-configuration-icinga-1) integration
|
||||
|
||||
## Icinga 2 <a href="manubulon-snmp-plugins-configuration-icinga-2"></a>
|
||||
|
||||
The Icinga 2 Template Library (ITL) already provides many [CheckCommand definitions](https://www.icinga.com/docs/icinga2/latest/doc/10-icinga-template-library/#plugin-check-commands-for-manubulon-snmp)
|
||||
out of the box. This enables you to just use the CheckCommand object and focus
|
||||
on your service apply rules.
|
||||
|
||||
### Icinga 2: Best Practices <a href="manubulon-snmp-plugins-configuration-icinga-2-best-practices"></a>
|
||||
|
||||
Best practice is to store the credentials in a separate constant:
|
||||
|
||||
```
|
||||
vim /etc/icinga2/constants.conf
|
||||
|
||||
const ManubulonSnmpCommunity = "icingasnmpro"
|
||||
```
|
||||
|
||||
Define a generic SNMP service template and set common attributes.
|
||||
|
||||
```
|
||||
template Service "snmp-template" {
|
||||
vars.snmp_community = ManubulonSnmpCommunity
|
||||
}
|
||||
```
|
||||
### Icinga 2: Apply Rules <a href="manubulon-snmp-plugins-configuration-icinga-2-apply"></a>
|
||||
|
||||
|
||||
Define service apply rules like this:
|
||||
|
||||
```
|
||||
apply Service "snmp-memory" {
|
||||
import "snmp-template"
|
||||
check_command = "snmp-memory"
|
||||
|
||||
vars.snmp_warn = "50,0"
|
||||
vars.snmp_crit = "80,0"
|
||||
|
||||
assign where "snmp" in host.groups
|
||||
}
|
||||
|
||||
apply Service "snmp-storage /var" {
|
||||
import "snmp-template"
|
||||
check_command = "snmp-storage"
|
||||
|
||||
vars.snmp_warn = "50"
|
||||
vars.snmp_crit = "80"
|
||||
vars.snmp_storage_name = "/var"
|
||||
|
||||
assign where "snmp" in host.groups
|
||||
}
|
||||
|
||||
apply Service "snmp-storage" {
|
||||
import "snmp-template"
|
||||
check_command = "snmp-storage"
|
||||
|
||||
vars.snmp_warn = "50"
|
||||
vars.snmp_crit = "80"
|
||||
|
||||
assign where "snmp" in host.groups
|
||||
}
|
||||
```
|
||||
|
||||
### Icinga 2: Apply For Rules <a href="manubulon-snmp-plugins-configuration-icinga-2-apply-for"></a>
|
||||
|
||||
A more complex example using apply for rules is to store the
|
||||
monitored storage disks on the host. This allows to generate
|
||||
service objects in a more efficient way.
|
||||
|
||||
```
|
||||
object Host "snmp-host" {
|
||||
check_command = "hostalive"
|
||||
|
||||
vars.snmp_storage["/"] = {
|
||||
snmp_warn = "80"
|
||||
snmp_crit = "90"
|
||||
}
|
||||
vars.snmp_storage["/var"] = {
|
||||
snmp_warn = "60"
|
||||
snmp_crit = "90"
|
||||
}
|
||||
}
|
||||
|
||||
apply Service "snmp-storage-" for (storage_name => config in host.vars.snmp_storage) {
|
||||
import "snmp-template"
|
||||
|
||||
display_name = "Storage: " + storage_name
|
||||
|
||||
vars += config
|
||||
vars.snmp_storage_name = storage_name
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Icinga 1.x/Naemon/Nagios <a href="manubulon-snmp-plugins-configuration-icinga-1"></a>
|
||||
|
||||
You need to write a check command definition and use that in your service definitions.
|
||||
Please refer to [this documentation](http://nagios.manubulon.com/index_commands.html).
|
891
doc/04-Plugins.md
Normal file
891
doc/04-Plugins.md
Normal file
|
@ -0,0 +1,891 @@
|
|||
# Manubulon SNMP Plugins <a href="manubulon-snmp-plugins"></a>
|
||||
|
||||
## Plugin Overview
|
||||
|
||||
Plugin | Description
|
||||
----------------------------------------------------------------------|----------------------------------------
|
||||
[check_snmp_storage](04-Plugins.md#manubulon-snmp-plugins-storage) | Storage checks (disks, swap, memory, etc.)
|
||||
[check_snmp_int](04-Plugins.md#manubulon-snmp-plugins-int) | Interface states, usage on hosts, switches, routers, etc.
|
||||
[check_snmp_process](04-Plugins.md#manubulon-snmp-plugins-process) | Running processes, their number, used CPU and memory.
|
||||
[check_snmp_load](04-Plugins.md#manubulon-snmp-plugins-load) | Load/CPU checks
|
||||
[check_snmp_mem](04-Plugins.md#manubulon-snmp-plugins-mem) | Memory and swap usage
|
||||
[check_snmp_env](04-Plugins.md#manubulon-snmp-plugins-env) | Environmental status of fan, temp, power supplies.
|
||||
[check_snmp_vrrp](04-Plugins.md#manubulon-snmp-plugins-vrrp) | Interface state of a VRRP cluster
|
||||
[check_snmp_cpfw](04-Plugins.md#manubulon-snmp-plugins-cpfw) | Checkpoint Firewall-1 status
|
||||
[check_snmp_win](04-Plugins.md#manubulon-snmp-plugins-win) | Windows services
|
||||
[check_snmp_css](04-Plugins.md#manubulon-snmp-plugins-css) | CSS service states
|
||||
[check_snmp_nsbox](04-Plugins.md#manubulon-snmp-plugins-nsbox) | Nsbox VHost and diode status
|
||||
[check_snmp_boostedge](04-Plugins.md#manubulon-snmp-plugins-hostedge) | Boostedge services
|
||||
[check_snmp_linkproof_ndr](04-Plugins.md#manubulon-snmp-plugins-ndr) | Linkproof NHR
|
||||
|
||||
|
||||
## check\_snmp\_storage<a href="manubulon-snmp-plugins-storage"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_storage.pl --help
|
||||
|
||||
SNMP Disk Monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
(c)2004-2007 Patrick Proy
|
||||
|
||||
Usage: check_snmp_storage [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r -s -i -G] [-e] [-S 0|1[,1,<car>]] [-o <octet_length>] [-R <% reserved>]
|
||||
By default, plugin will monitor %used on drives :
|
||||
warn if %used > warn and critical if %used > crit
|
||||
-v, --verbose
|
||||
print extra debugging information (and lists all storages)
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies SNMP v1)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-x, --passwd=PASSWD
|
||||
Password for snmpv3 authentication
|
||||
-p, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-P, --protocol=PROTOCOL
|
||||
Network protocol to be used
|
||||
['udp/ipv4'] : UDP over IPv4
|
||||
'udp/ipv6' : UDP over IPv6
|
||||
'tcp/ipv4' : TCP over IPv4
|
||||
'tcp/ipv6' : TCP over IPv6
|
||||
-m, --name=NAME
|
||||
Name in description OID (can be mounpoints '/home' or 'Swap Space'...)
|
||||
This is treated as a regexp : -m /var will match /var , /var/log, /opt/var ...
|
||||
Test it before, because there are known bugs (ex : trailling /)
|
||||
No trailing slash for mountpoints !
|
||||
-q, --storagetype=[Other|Ram|VirtualMemory|FixedDisk|RemovableDisk|FloppyDisk
|
||||
CompactDisk|RamDisk|FlashMemory|NetworkDisk]
|
||||
Also check the storage type in addition of the name
|
||||
It is possible to use regular expressions ( "FixedDisk|FloppyDisk" )
|
||||
-r, --noregexp
|
||||
Do not use regexp to match NAME in description OID
|
||||
-s, --sum
|
||||
Add all storages that match NAME (used space and total space)
|
||||
THEN make the tests.
|
||||
-i, --index
|
||||
Parse index table instead of description table to select storage
|
||||
-e, --exclude
|
||||
Select all storages except the one(s) selected by -m
|
||||
No action on storage type selection
|
||||
-T, --type=TYPE
|
||||
pl : calculate percent left
|
||||
pu : calculate percent used (Default)
|
||||
bl : calculate MegaBytes left
|
||||
bu : calculate MegaBytes used
|
||||
-w, --warn=INTEGER
|
||||
percent / MB of disk used to generate WARNING state
|
||||
you can add the % sign
|
||||
-c, --critical=INTEGER
|
||||
percent / MB of disk used to generate CRITICAL state
|
||||
you can add the % sign
|
||||
-R, --reserved=INTEGER
|
||||
% reserved blocks for superuser
|
||||
For ext2/3 filesystems, it is 5% by default
|
||||
-G, --gigabyte
|
||||
output, warning & critical levels in gigabytes
|
||||
-f, --perfparse, --perfdata
|
||||
Performance data output
|
||||
-S, --short=<type>[,<where>,<cut>]
|
||||
<type>: Make the output shorter :
|
||||
0 : only print the global result except the disk in warning or critical
|
||||
ex: "< 80% : OK"
|
||||
1 : Don't print all info for every disk
|
||||
ex : "/ : 66 %used (< 80) : OK"
|
||||
<where>: (optional) if = 1, put the OK/WARN/CRIT at the beginning
|
||||
<cut>: take the <n> first caracters or <n> last if n<0
|
||||
-o, --octetlength=INTEGER
|
||||
max-size of the SNMP message, usefull in case of Too Long responses.
|
||||
Be carefull with network filters. Range 484 - 65535, default are
|
||||
usually 1472,1452,1460 or 1440.
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
Note :
|
||||
with T=pu or T=bu : OK < warn < crit
|
||||
with T=pl ot T=bl : crit < warn < OK
|
||||
|
||||
If multiple storage are selected, the worse condition will be returned
|
||||
i.e if one disk is critical, the return is critical
|
||||
|
||||
example :
|
||||
Browse storage list : <script> -C <community> -H <host> -m <anything> -w 1 -c 2 -v
|
||||
the -m option allows regexp in perl format :
|
||||
Test drive C,F,G,H,I on Windows : -m ^[CFGHI]:
|
||||
Test all mounts containing /var : -m /var
|
||||
Test all mounts under /var : -m ^/var
|
||||
Test only /var : -m /var -r
|
||||
Test all swap spaces : -m ^Swap
|
||||
Test all but swap spaces : -m ^Swap -e
|
||||
```
|
||||
|
||||
## check\_snmp\_int <a href="manubulon-snmp-plugins-int"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_int.pl --help
|
||||
|
||||
SNMP Network Interface Monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
GPL license, (c)2004-2007 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_int.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>) [-p <port>] -n <name in desc_oid> [-N -A -i -a -D --down] [-r] [-f[eSyY]] [-k[qBMGu] -g -w<warn levels> -c<crit levels> -d<delta>] [-o <octet_length>] [-t <timeout>] [-s] --label [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information (including interface list on the system)
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD, -2, --v2c
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-2 : use snmp v2c
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-P, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-n, --name=NAME
|
||||
Name in description OID (eth0, ppp0 ...).
|
||||
This is treated as a regexp : -n eth will match eth0,eth1,...
|
||||
Test it before, because there are known bugs (ex : trailling /)
|
||||
-r, --noregexp
|
||||
Do not use regexp to match NAME in description OID
|
||||
-N, --use-ifname
|
||||
Use IF-MIB::ifName as source for NIC name instead of IF-MIB::ifDescr
|
||||
-A, --use-ifalias
|
||||
Use IF-MIB::ifAlias as source for NIC name instead of IF-MIB::ifDescr
|
||||
-i, --inverse
|
||||
Make critical when up
|
||||
-a, --admin
|
||||
Use administrative status instead of operational
|
||||
-D, --dormant
|
||||
Dormant state is an OK state
|
||||
--down
|
||||
Down state is an OK state
|
||||
-o, --octetlength=INTEGER
|
||||
max-size of the SNMP message, usefull in case of Too Long responses.
|
||||
Be carefull with network filters. Range 484 - 65535, default are
|
||||
usually 1472,1452,1460 or 1440.
|
||||
-f, --perfparse, --perfdata
|
||||
Performance data output (no output when interface is down).
|
||||
-W, --weather
|
||||
Output data for "weathermap" lines in NagVis with performance data
|
||||
-e, --error
|
||||
Add error & discard to Perfparse output
|
||||
-S, --intspeed
|
||||
Include speed in performance output in bits/s
|
||||
-y, --perfprct ; -Y, --perfspeed
|
||||
-y : output performance data in % of max speed
|
||||
-Y : output performance data in bits/s or Bytes/s (depending on -B)
|
||||
-k, --perfcheck ; -q, --extperfcheck
|
||||
-k check the input/ouput bandwidth of the interface
|
||||
-q also check the error and discard input/output
|
||||
--label
|
||||
Add label before speed in output : in=, out=, errors-out=, etc...
|
||||
-g, --64bits
|
||||
Use 64 bits counters instead of the standard counters when checking
|
||||
bandwidth & performance data for interface >= 1Gbps.
|
||||
You must use snmp v2c or v3 to get 64 bits counters.
|
||||
-d, --delta=seconds
|
||||
make an average of <delta> seconds (default 300=5min)
|
||||
-B, --kbits
|
||||
Make the warning and critical levels in K|M|G Bits/s instead of K|M|G Bytes/s
|
||||
-G, --giga ; -M, --mega ; -u, --prct
|
||||
-G : Make the warning and critical levels in Gbps (with -B) or GBps
|
||||
-M : Make the warning and critical levels in Mbps (with -B) or MBps
|
||||
-u : Make the warning and critical levels in % of reported interface speed.
|
||||
-w, --warning=input,output[,error in,error out,discard in,discard out]
|
||||
warning level for input / output bandwidth (0 for no warning)
|
||||
unit depends on B,M,G,u options
|
||||
warning for error & discard input / output in error/min (need -q)
|
||||
-c, --critical=input,output[,error in,error out,discard in,discard out]
|
||||
critical level for input / output bandwidth (0 for no critical)
|
||||
unit depends on B,M,G,u options
|
||||
critical for error & discard input / output in error/min (need -q)
|
||||
-s, --short=int
|
||||
Make the output shorter : only the first <n> chars of the interface(s)
|
||||
If the number is negative, then get the <n> LAST caracters.
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
Note : when multiple interface are selected with regexp,
|
||||
all be must be up (or down with -i) to get an OK result.
|
||||
```
|
||||
|
||||
## check\_snmp\_process <a href="manubulon-snmp-plugins-process"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_process.pl --help
|
||||
|
||||
SNMP Process Monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
GPL license, (c)2004-2006 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_process.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd) [-p <port>] [-P <IP Protocol>] -n <name> [-w <min_proc>[,<max_proc>] -c <min_proc>[,max_proc] ] [-m<warn Mb>,<crit Mb> -a -u<warn %>,<crit%> -d<delta> ] [-t <timeout>] [-o <octet_length>] [-f -A -F ] [-r] [-V] [-g]
|
||||
-v, --verbose
|
||||
print extra debugging information (and lists all storages)
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies SNMP v1 or v2c with option)
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD, -2, --v2c
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-2 : use snmp v2c
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-p, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-P, --protocol=PROTOCOL
|
||||
Network protocol to be used
|
||||
['udp/ipv4'] : UDP over IPv4
|
||||
'udp/ipv6' : UDP over IPv6
|
||||
'tcp/ipv4' : TCP over IPv4
|
||||
'tcp/ipv6' : TCP over IPv6
|
||||
-n, --name=NAME
|
||||
Name of the process (regexp)
|
||||
No trailing slash !
|
||||
-r, --noregexp
|
||||
Do not use regexp to match NAME in description OID
|
||||
-f, --fullpath
|
||||
Use full path name instead of process name
|
||||
(Windows doesn't provide full path name)
|
||||
-A, --param
|
||||
Add parameters to select processes.
|
||||
ex : "named.*-t /var/named/chroot" will only select named process with this parameter
|
||||
-F, --perfout
|
||||
Add performance output
|
||||
outputs : memory_usage, num_process, cpu_usage
|
||||
-w, --warn=MIN[,MAX]
|
||||
Number of process that will cause a warning
|
||||
-1 for no warning, MAX must be >0. Ex : -w-1,50
|
||||
-c, --critical=MIN[,MAX]
|
||||
number of process that will cause an error (
|
||||
-1 for no critical, MAX must be >0. Ex : -c-1,50
|
||||
Notes on warning and critical :
|
||||
with the following options : -w m1,x1 -c m2,x2
|
||||
you must have : m2 <= m1 < x1 <= x2
|
||||
you can omit x1 or x2 or both
|
||||
-m, --memory=WARN,CRIT
|
||||
checks memory usage (default max of all process)
|
||||
values are warning and critical values in Mb
|
||||
-a, --average
|
||||
makes an average of memory used by process instead of max
|
||||
-u, --cpu=WARN,CRIT
|
||||
checks cpu usage of all process
|
||||
values are warning and critical values in % of CPU usage
|
||||
if more than one CPU, value can be > 100% : 100%=1 CPU
|
||||
-d, --delta=seconds
|
||||
make an average of <delta> seconds for CPU (default 300=5min)
|
||||
-g, --getall
|
||||
In some cases, it is necessary to get all data at once because
|
||||
process die very frequently.
|
||||
This option eats bandwidth an cpu (for remote host) at breakfast.
|
||||
-o, --octetlength=INTEGER
|
||||
max-size of the SNMP message, usefull in case of Too Long responses.
|
||||
Be carefull with network filters. Range 484 - 65535, default are
|
||||
usually 1472,1452,1460 or 1440.
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
Note :
|
||||
CPU usage is in % of one cpu, so maximum can be 100% * number of CPU
|
||||
example :
|
||||
Browse process list : <script> -C <community> -H <host> -n <anything> -v
|
||||
the -n option allows regexp in perl format :
|
||||
All process of /opt/soft/bin : -n /opt/soft/bin/ -f
|
||||
All 'named' process : -n named
|
||||
```
|
||||
|
||||
## check\_snmp\_load <a href="manubulon-snmp-plugins-load"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_load.pl --help
|
||||
|
||||
SNMP Load & CPU Monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
GPL license, (c)2004-2007 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_load.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -w <warn level> -c <crit level> -T=[stand|netsl|netsc|as400|cisco|cata|cisg|nsc|fg|bc|nokia|hp|lp|hpux] [-f] [-t <timeout>] [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-p, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-P, --protocol=PROTOCOL
|
||||
Network protocol to be used
|
||||
['udp/ipv4'] : UDP over IPv4
|
||||
'udp/ipv6' : UDP over IPv6
|
||||
'tcp/ipv4' : TCP over IPv4
|
||||
'tcp/ipv6' : TCP over IPv6
|
||||
|
||||
Network protocol (Default udp/ipv4)
|
||||
-w, --warn=INTEGER | INT,INT,INT
|
||||
1 value check : warning level for cpu in percent (on one minute)
|
||||
3 value check : comma separated level for load or cpu for 1min, 5min, 15min
|
||||
-c, --crit=INTEGER | INT,INT,INT
|
||||
critical level for cpu in percent (on one minute)
|
||||
1 value check : critical level for cpu in percent (on one minute)
|
||||
3 value check : comma separated level for load or cpu for 1min, 5min, 15min
|
||||
-T, --type=stand|netsl|netsc|as400|cisco|cisg|bc|nokia|hp|lp
|
||||
CPU check :
|
||||
stand : standard MIBII (works with Windows),
|
||||
can handle multiple CPU.
|
||||
netsl : linux load provided by Net SNMP (1,5 & 15 minutes values)
|
||||
netsc : cpu usage given by net-snmp (100-idle)
|
||||
as400 : as400 CPU usage
|
||||
cisco : Cisco CPU usage
|
||||
n5k : Cisco Nexus CPU Usage
|
||||
cata : Cisco catalyst CPU usage
|
||||
cisg : Cisco small business (SG500) CPU usage (1,5 & 15 minutes values)
|
||||
nsc : NetScreen CPU usage
|
||||
fg : Fortigate CPU usage
|
||||
bc : Bluecoat CPU usage
|
||||
nokia : Nokia CPU usage
|
||||
hp : HP procurve switch CPU usage
|
||||
lp : Linkproof CPU usage
|
||||
hpux : HP-UX load (1,5 & 15 minutes values)
|
||||
-f, --perfparse, --perfdata
|
||||
Performance data output
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
```
|
||||
|
||||
## check\_snmp\_mem <a href="manubulon-snmp-plugins-mem"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_load.pl --help
|
||||
|
||||
SNMP Load & CPU Monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
GPL license, (c)2004-2007 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_load.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -w <warn level> -c <crit level> -T=[stand|netsl|netsc|as400|cisco|cata|cisg|nsc|fg|bc|nokia|hp|lp|hpux] [-f] [-t <timeout>] [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-p, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-P, --protocol=PROTOCOL
|
||||
Network protocol to be used
|
||||
['udp/ipv4'] : UDP over IPv4
|
||||
'udp/ipv6' : UDP over IPv6
|
||||
'tcp/ipv4' : TCP over IPv4
|
||||
'tcp/ipv6' : TCP over IPv6
|
||||
|
||||
Network protocol (Default udp/ipv4)
|
||||
-w, --warn=INTEGER | INT,INT,INT
|
||||
1 value check : warning level for cpu in percent (on one minute)
|
||||
3 value check : comma separated level for load or cpu for 1min, 5min, 15min
|
||||
-c, --crit=INTEGER | INT,INT,INT
|
||||
critical level for cpu in percent (on one minute)
|
||||
1 value check : critical level for cpu in percent (on one minute)
|
||||
3 value check : comma separated level for load or cpu for 1min, 5min, 15min
|
||||
-T, --type=stand|netsl|netsc|as400|cisco|cisg|bc|nokia|hp|lp
|
||||
CPU check :
|
||||
stand : standard MIBII (works with Windows),
|
||||
can handle multiple CPU.
|
||||
netsl : linux load provided by Net SNMP (1,5 & 15 minutes values)
|
||||
netsc : cpu usage given by net-snmp (100-idle)
|
||||
as400 : as400 CPU usage
|
||||
cisco : Cisco CPU usage
|
||||
n5k : Cisco Nexus CPU Usage
|
||||
cata : Cisco catalyst CPU usage
|
||||
cisg : Cisco small business (SG500) CPU usage (1,5 & 15 minutes values)
|
||||
nsc : NetScreen CPU usage
|
||||
fg : Fortigate CPU usage
|
||||
bc : Bluecoat CPU usage
|
||||
nokia : Nokia CPU usage
|
||||
hp : HP procurve switch CPU usage
|
||||
lp : Linkproof CPU usage
|
||||
hpux : HP-UX load (1,5 & 15 minutes values)
|
||||
-f, --perfparse, --perfdata
|
||||
Performance data output
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
michi@mbmif ~/coding/addons/manubulon-snmp/plugins (master *=) $ ./check_snmp_mem.pl --help
|
||||
|
||||
SNMP Memory Monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
GPL license, (c)2004-2007 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_mem.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -w <warn level> -c <crit level> [-I|-N|-E] [-f] [-m -b] [-t <timeout>] [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies SNMP v1 or v2c with option)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-p, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-P, --protocol=PROTOCOL
|
||||
Network protocol to be used
|
||||
['udp/ipv4'] : UDP over IPv4
|
||||
'udp/ipv6' : UDP over IPv6
|
||||
'tcp/ipv4' : TCP over IPv4
|
||||
'tcp/ipv6' : TCP over IPv6
|
||||
-w, --warn=INTEGER | INT,INT
|
||||
warning level for memory in percent (0 for no checks)
|
||||
Default (-N switch) : comma separated level for Real Memory and Swap
|
||||
-I switch : warning level
|
||||
-c, --crit=INTEGER | INT,INT
|
||||
critical level for memory in percent (0 for no checks)
|
||||
Default (-N switch) : comma separated level for Real Memory and Swap
|
||||
-I switch : critical level
|
||||
-N, --netsnmp (default)
|
||||
check linux memory & swap provided by Net SNMP
|
||||
-m, --memcache
|
||||
include cached memory in used memory (only with Net-SNMP)
|
||||
-b, --membuffer
|
||||
exclude buffered memory in used memory (only with Net-SNMP)
|
||||
-I, --cisco
|
||||
check cisco memory (sum of all memory pools)
|
||||
-E, --hp
|
||||
check HP Procurve memory
|
||||
-f, --perfdata
|
||||
Performance data output
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
```
|
||||
|
||||
## check\_snmp\_env <a href="manubulon-snmp-plugins-env"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_env.pl --help
|
||||
|
||||
SNMP environmental Monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
GPL License, (c)2006-2007 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_env.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -T (cisco|nokia|bc|iron|foundry|linux) [-F <rpm>] [-c <celcius>] [-f] [-t <timeout>] [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-P, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-T, --type=cisco|nokia|bc|iron|foundry
|
||||
Environemental check :
|
||||
cisco : All Cisco equipements : voltage,temp,fan,power supply
|
||||
(will try to check everything in the env mib)
|
||||
nokia : Nokia IP platforms : fan and power supply
|
||||
bc : BlueCoat platforms : fans, power supply, voltage, disks
|
||||
iron : IronPort platforms : fans, power supply, temp
|
||||
foundry : Foundry Network platforms : power supply, temp
|
||||
linux : Net-SNMP with LM-SENSORS : temp, fan, volt, misc
|
||||
-F, --fan=<rpm>
|
||||
Minimum fan rpm value (only needed for 'iron' & 'linux')
|
||||
-c, --celcius=<celcius>
|
||||
Maximum temp in degree celcius (only needed for 'iron' & 'linux')
|
||||
-f, --perfparse
|
||||
Perfparse compatible output
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
```
|
||||
|
||||
## check\_snmp\_vrrp <a href="manubulon-snmp-plugins-vrrp"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_vrrp.pl --help
|
||||
|
||||
SNMP VRRP Monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
GPL license, (c)2004-2007 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_vrrp.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) -s <master|backup|num,%> [-T <nokia|alteon|lp|nsc|ipsocluster|foundry>] [-p <port>] [-t <timeout>] [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-P, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-T, --type=<nokia|alteon|lp|nsc|ipso>
|
||||
Type of vrrp router to check
|
||||
nokia (default) : Nokia vrrp. Should be working for most vrrp routers
|
||||
alteon : for Alteon AD4 Loadbalancers
|
||||
lp : Radware Linkproof
|
||||
nsc : Nescreen (ScreenOS 5.x NSRP)
|
||||
ipso : Nokia IPSO clustering
|
||||
foundry : Foundry VRRP
|
||||
-s, --state=master|backup|num,%
|
||||
Nokia ipso clustering : number of members, max % assigned to nodes.
|
||||
Other : check vrrp interface to be master or backup
|
||||
-g, --long
|
||||
Make output long even is all is OK
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
```
|
||||
|
||||
## check\_snmp\_cpfw <a href="manubulon-snmp-plugins-cpfw"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_cpfw.pl --help
|
||||
|
||||
SNMP Checkpoint FW-1 Monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
GPL License, (c)2004-2007 - Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_cpfw.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-s] [-w [-p=pol_name] [-c=warn,crit]] [-m] [-a [standby] ] [-f] [-p <port>] [-t <timeout>] [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information (including interface list on the system)
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-s, --svn
|
||||
check for svn status
|
||||
-w, --fw
|
||||
check for fw status
|
||||
-a, --ha[=standby]
|
||||
check for ha status and node in "active" state
|
||||
If using SecurePlatform and monitoring a standby unit, put "standby" too
|
||||
-m, --mgmt
|
||||
check for management status
|
||||
-p, --policy=POLICY_NAME
|
||||
check if installed policy is POLICY_NAME (must have -w)
|
||||
-c, --connexions=WARN,CRIT
|
||||
check warn and critical number of connexions (must have -w)
|
||||
-f, --perfparse, --perfdata
|
||||
performance data output (only works with -c)
|
||||
-P, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP (Default: Nagios default)
|
||||
-V, --version
|
||||
prints version number
|
||||
```
|
||||
|
||||
## check\_snmp\_win <a href="manubulon-snmp-plugins-win"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_win.pl --help
|
||||
|
||||
SNMP Windows Monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
GPL license, (c)2004-2007 Patrick Proy
|
||||
|
||||
Usage: check_snmp_win [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd) [-p <port>] -n <name>[,<name2] [-T=service] [-r] [-s] [-N=<n>] [-t <timeout>] [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information (and lists all services)
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies SNMP v1 or v2c with option)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN
|
||||
Login for snmpv3 authentication (implies v3 protocol with MD5)
|
||||
-x, --passwd=PASSWD
|
||||
Password for snmpv3 authentication
|
||||
-p, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-T, --type=service
|
||||
Check type :
|
||||
- service (default) checks service
|
||||
-n, --name=NAME[,NAME2...]
|
||||
Comma separated names of services (perl regular expressions can be used for every one).
|
||||
By default, it is not case sensitive.
|
||||
-N, --number=<n>
|
||||
Compare matching services with <n> instead of the number of names provided.
|
||||
-s, --showall
|
||||
Show all services in the output, instead of only the non-active ones.
|
||||
-r, --noregexp
|
||||
Do not use regexp to match NAME in service description.
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
Note :
|
||||
The script will return
|
||||
OK if ALL services are in active state,
|
||||
WARNING if there is more than specified (ex 2 service specified, 3 active services matching),
|
||||
CRITICAL if at least one of them is non active.
|
||||
The -n option will allows regexp in perl format
|
||||
-n "service" will match 'service WINS' 'sevice DNS' etc...
|
||||
It is not case sensitive by default : WINS = wins
|
||||
```
|
||||
|
||||
## check\_snmp\_css <a href="manubulon-snmp-plugins-css"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_css.pl --help
|
||||
|
||||
SNMP Cisco CSS monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
(c)2004-2006 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_css.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) -n <name> [-d directory] [-w <num>,<resp>,<conn> -c <num>,<resp>,<conn>] [-p <port>] [-f] [-t <timeout>] [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-n, --name=<name>
|
||||
regexp to select service
|
||||
-w, --warning=<num>,<resp>,<conn>
|
||||
Optional. Warning level for
|
||||
- minimum number of active & alive service
|
||||
- average response time
|
||||
- number of connexions
|
||||
For no warnings, put -1 (ex : -w5,-1,3).
|
||||
When using negative numbers, dont put space after "-w"
|
||||
-d, --dir=<directory to put file>
|
||||
Directory where the temp file with index, created by check_snmp_css_main.pl, can be found
|
||||
If no directory is set, /tmp will be used
|
||||
-c, --critical=<num>,resp>,<conn>
|
||||
Optional. Critical levels (-1 for no critical levels)
|
||||
See warning levels.
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-P, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-f, --perfparse
|
||||
Perfparse compatible output
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
```
|
||||
|
||||
## check\_snmp\_nsbox <a href="manubulon-snmp-plugins-nsbox"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_nsbox.pl --help
|
||||
|
||||
SNMP NetSecureOne Netbox monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
(c)2004-2006 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_nsbox.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) -d <diode> -s <vhost> -n <ndiode>,<nvhost> [-p <port>] [-f] [-t <timeout>] [-V]
|
||||
Check that diode and vhost selected by regexp are active.
|
||||
-v, --verbose
|
||||
print extra debugging information
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-d, --diode=<diode>
|
||||
Diode selection by regexp
|
||||
-s, --vhost=<vhost>
|
||||
Vhost selection by regexp
|
||||
-n, --number=<ndiode>,<nvhost>
|
||||
number of diode and vhost that must be up.
|
||||
-P, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-f, --perfparse, --perfdata
|
||||
Performance data output
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
```
|
||||
|
||||
## check\_snmp\_boostedge <a href="manubulon-snmp-plugins-boostedge"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_boostedge.pl --help
|
||||
|
||||
SNMP Boostedge service monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
GPL License, (c)2006-2007 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_boostedge.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) -s <service> -n <number> [-p <port>] [-f] [-t <timeout>] [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
-s, --service=<service>
|
||||
Regexp of service to select
|
||||
-n, --number=<number>
|
||||
Number of services selected that must be in running & enabled state
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-P, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-f, --perfparse, --perfdata
|
||||
Performance data output
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
```
|
||||
|
||||
## check\_snmp\_linkproof\_nhr <a href="manubulon-snmp-plugins-linkproof-nhr"></a>
|
||||
|
||||
```
|
||||
$ ./check_snmp_linkproof_nhr.pl --help
|
||||
|
||||
SNMP Radware Linkproof NHR monitor for Icinga/Nagios/Naemon/Shinken, Version 2.1.0
|
||||
(c)2004-2006 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_linkproof_nhr.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-f] [-t <timeout>] [-V]
|
||||
The plugin will test all nhr configured and will return
|
||||
OK if all nhr are active
|
||||
WARNING if one nhr at least is in "no new session" or "inactive" mode.
|
||||
CRITICAL if all nhr are inactive.
|
||||
-v, --verbose
|
||||
print extra debugging information
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-P, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-f, --perfparse, --perfdata
|
||||
Performance data output
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
```
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
################################
|
||||
Release 1.1.2 / Jun 2007 :
|
||||
|
||||
Scripts, actual CVS version and changelog :
|
||||
check_snmp_mem.pl : 1.3
|
||||
check_snmp_vrrp.pl : 1.3
|
||||
check_snmp_linkproof_nhr.pl : 1.1
|
||||
check_snmp_process.pl : 1.7
|
||||
- Added option to select process with his parameter
|
||||
- Added option for performance output
|
||||
- Corrected negative CPU when process restarts
|
||||
- Added delta option for cpu average (-d option)
|
||||
check_snmp_boostedge.pl : 1.2
|
||||
check_snmp_nsbox.pl : 1.2
|
||||
check_snmp_css_main.pl : 1.1
|
||||
check_snmp_cpfw.pl : 1.7
|
||||
check_snmp_int.pl : 1.22
|
||||
- Correct speed query for interface > 4 Gbps
|
||||
- Reduced snmp queries to 2 instead of 3 when perf data is on
|
||||
- Bad maximum in perfdata when in Bps
|
||||
- Added option to make dormant state OK
|
||||
check_snmp_storage.pl : 1.10
|
||||
- Return an UNKNOWN status when size/used/alloc is not defined in snmp
|
||||
- Patch from Alexander Greiner-B?r to remove the reserved disk space for superuser on ext2/3 FS.
|
||||
New -R option for this
|
||||
- Added -G (giga) option for output & levels in Gigabytes
|
||||
check_snmp_win.pl : 0.6
|
||||
check_snmp_css.pl : 1.3
|
||||
check_snmp_env.pl : 1.8
|
||||
- Added test to check existence of some OIDs
|
||||
check_snmp_load.pl : 1.11
|
||||
- Corrected bug in performance output
|
||||
- Added SIG{ALRM} sub and % sign in output
|
||||
|
||||
################################
|
||||
Release 1.1.1 / April 2007 :
|
||||
|
||||
Added documentation in doc/ directory : (html format).
|
||||
|
||||
Scripts, actual CVS version and changelog :
|
||||
check_snmp_mem.pl : 1.3
|
||||
check_snmp_vrrp.pl : 1.3
|
||||
check_snmp_linkproof_nhr.pl : 1.1
|
||||
check_snmp_process.pl : 1.5
|
||||
Makina Corpus contribs : snmpv3 enhancements, msg size parameter (-o)
|
||||
check_snmp_boostedge.pl : 1.2 (No major changes)
|
||||
check_snmp_nsbox.pl : 1.2 (No major changes)
|
||||
check_snmp_css_main.pl : 1.1
|
||||
check_snmp_cpfw.pl : 1.7
|
||||
Added active/backup detection with SecureXL
|
||||
Added SIG{ALRM} sub and small bug
|
||||
check_snmp_int.pl : 1.18
|
||||
Added bigint module to take care of 64 bits counters
|
||||
check usage of snmp v2c or v3 when you use 64 bit counters (-g)
|
||||
Added SIG{ALRM} sub
|
||||
Added warning and critical levels in performance output
|
||||
Added labels before in, out speed and errors (M. Berger contrib)
|
||||
Added highperf counters option (-g)
|
||||
Added SNMP packet length option (-o)
|
||||
Added warning/critical levels in Mbps, MBps, Gbps, GBps options (-M, -G)
|
||||
Added warning/critical levels in % of interface speed (-u)
|
||||
Added performance output interface speed option (-S)
|
||||
Added performance output in Bps or bps (-Y)
|
||||
Added performance output in % of interface speed (-y)
|
||||
Added port for snmpv3 (R. Leroy contrib)
|
||||
check_snmp_storage.pl : 1.6
|
||||
Makina Corpus contribs : snmpv3 port parameter, msg size parameter (-o)
|
||||
check_snmp_win.pl : 0.6
|
||||
check_snmp_css.pl : 1.3
|
||||
check_snmp_env.pl : 1.7
|
||||
Added SIG{ALRM} sub
|
||||
Added voltage & temp checks on Cisco
|
||||
Added Foundry checks
|
||||
check_snmp_load.pl : 1.9
|
||||
Added SIG{ALRM} sub and % sign in output
|
||||
Bug in performance output
|
||||
|
||||
################################
|
||||
Release 1.1 :
|
||||
|
||||
Added scripts :
|
||||
- check_snmp_css_main : to get all services name and OID one time, then check only one OID with check_snmp_css. Reduces css cpu.
|
||||
|
||||
Corrected bugs :
|
||||
- install.sh (Net::snmp detection)
|
||||
- corrected bugs in check_snmp_css
|
||||
- Added ironport checks in check_snmp_env
|
||||
- Added hpux in check_snmp_load
|
||||
- Bugs in check_snmp_int (specially for Windows).
|
||||
|
||||
Scripts and versions :
|
||||
check_snmp_mem.pl : 1.3
|
||||
check_snmp_vrrp.pl : 1.3
|
||||
check_snmp_linkproof_nhr.pl : 1.1
|
||||
check_snmp_process.pl : 1.4
|
||||
check_snmp_boostedge.pl : 1.1
|
||||
check_snmp_nsbox.pl : 1.1
|
||||
check_snmp_css_main.pl : 1.1
|
||||
check_snmp_cpfw.pl : 1.4
|
||||
check_snmp_int.pl : 1.10
|
||||
check_snmp_storage.pl : 1.5
|
||||
check_snmp_win.pl : 0.6
|
||||
check_snmp_css.pl : 1.3
|
||||
check_snmp_env.pl : 1.4
|
||||
check_snmp_load.pl : 1.9
|
||||
|
||||
################################
|
||||
Release 1.0 :
|
||||
Initial file release.
|
|
@ -1,15 +0,0 @@
|
|||
Installation:
|
||||
-------------
|
||||
|
||||
You can simply copy the .pl files to the Nagios Plugin directory if
|
||||
- Nagios plugins and utils.pm file are in /usr/local/nagios/libexec.
|
||||
- You are sure Net::SNMP is installed. (Getopt::Long is standard).
|
||||
- perl is in /usr/bin/perl
|
||||
- Temp files can be written by Nagios in /tmp
|
||||
|
||||
You can also use the "install.sh" script provided in this directory to install the plugins.
|
||||
Type : "./install.sh" to install all the plugins or "./install.sh <plugin name>" for a specific one.
|
||||
|
||||
The script will check for dependencies and ask for Nagios and temp directories.
|
||||
It will modify the scripts depending on these answers and install the scripts.
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
Nagios SNMP plugins 1.1.2 README
|
||||
------------------------------
|
||||
|
||||
|
||||
Nagios SNMP plugins is a set of Nagios plugins to check hosts/devices using snmp protocol.
|
||||
http://nagios.manubulon.com for more details.
|
||||
|
||||
|
||||
Requirements:
|
||||
-------------
|
||||
- perl in /usr/bin/perl
|
||||
- Net::SNMP and Getopt::Long
|
||||
- File utils.pm in Nagios plugin directory (default /usr/local/nagios/libexec)
|
||||
- Nagios user can write files in /tmp/ directory
|
||||
|
||||
Perl, default directory and temp files location can be changed using the install.sh script.
|
||||
|
||||
Installation:
|
||||
-------------
|
||||
|
||||
Read INSTALL file
|
||||
|
||||
Help and support:
|
||||
-----------------
|
||||
|
||||
Help files, config examples and FAQ in the doc/ directory
|
||||
http://nagios.manubulon.com/
|
||||
FAQ : http://nagios.manubulon.com/faq.html
|
||||
Mailling list, forum : http://sourceforge.net/projects/nagios-snmp/
|
||||
|
||||
|
||||
Legal stuff:
|
||||
------------
|
||||
|
||||
Nagios SNMP plugins version 1.1.2, Copyright (C) 2004-2007 Patrick Proy (nagios at proy.org)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
Nagios and the Nagios logo are registered trademarks of Ethan Galstad.
|
|
@ -38,7 +38,7 @@ my $be_service_connect
|
|||
|
||||
# Globals
|
||||
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
my $o_host = undef; # hostname
|
||||
my $o_community = undef; # community
|
||||
|
@ -247,6 +247,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
@ -257,6 +258,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl -w
|
||||
############################## check_snmp_cpfw ##############
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
# Date : Oct 20 2007
|
||||
# Author : Patrick Proy (patrick at proy.org)
|
||||
|
|
|
@ -35,7 +35,7 @@ my @css_svc_state_nag = (3, 2, 2, 3, 0, 2);
|
|||
|
||||
# Globals
|
||||
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
my $o_host = undef; # hostname
|
||||
my $o_community = undef; # community
|
||||
|
@ -326,6 +326,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
@ -336,6 +337,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
|
|
@ -35,7 +35,7 @@ my @css_svc_state_nag = (3, 2, 2, 3, 0, 2);
|
|||
|
||||
# Globals
|
||||
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
my $o_host = undef; # hostname
|
||||
my $o_community = undef; # community
|
||||
|
@ -205,6 +205,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
@ -215,6 +216,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
|
|
@ -167,7 +167,7 @@ my $linux_misc_value = "1.3.6.1.4.1.2021.13.16.4.1.3"; # misc entry value
|
|||
|
||||
# Globals
|
||||
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
my $o_host = undef; # hostname
|
||||
my $o_community = undef; # community
|
||||
|
@ -383,6 +383,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
@ -393,6 +394,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl -w
|
||||
############################## check_snmp_int ##############
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
# Date : Oct 10 2007
|
||||
# Author : Patrick Proy ( patrick at proy.org )
|
||||
|
@ -73,6 +73,7 @@ my $o_version = undef; # print version
|
|||
my $o_noreg = undef; # Do not use Regexp for name
|
||||
my $o_short = undef; # set maximum of n chars to be displayed
|
||||
my $o_label = undef; # add label before speed (in, out, etc...).
|
||||
my $o_weather = undef; # output "weathermap" data for NagVis
|
||||
|
||||
# Performance data options
|
||||
my $o_perf = undef; # Output performance data
|
||||
|
@ -229,6 +230,8 @@ sub help {
|
|||
usually 1472,1452,1460 or 1440.
|
||||
-f, --perfparse, --perfdata
|
||||
Performance data output (no output when interface is down).
|
||||
-W, --weather
|
||||
Output data for "weathermap" lines in NagVis with performance data
|
||||
-e, --error
|
||||
Add error & discard to Perfparse output
|
||||
-S, --intspeed
|
||||
|
@ -353,7 +356,9 @@ sub check_options {
|
|||
'delta:i' => \$o_delta,
|
||||
'D' => \$o_dormant,
|
||||
'dormant' => \$o_dormant,
|
||||
'down' => \$o_down
|
||||
'down' => \$o_down,
|
||||
'W' => \$o_weather,
|
||||
'weather' => \$o_weather
|
||||
);
|
||||
if (defined($o_help)) { help(); exit $ERRORS{"UNKNOWN"} }
|
||||
if (defined($o_version)) { p_version(); exit $ERRORS{"UNKNOWN"} }
|
||||
|
@ -418,6 +423,11 @@ sub check_options {
|
|||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
if (defined($o_weather) && !defined($o_perf)) {
|
||||
print "Cannot output weathermap line data without -f option!\n";
|
||||
print_usage();
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
if (defined($o_perfr) && defined($o_perfp)) {
|
||||
print "-Y and -y options are exclusives\n";
|
||||
print_usage();
|
||||
|
@ -718,7 +728,7 @@ for (my $i = 0; $i < $num_int; $i++) {
|
|||
if (defined($o_checkperf) && $int_status == 1) {
|
||||
$temp_file_name = $descr[$i];
|
||||
$temp_file_name =~ s/[ ;\/]/_/g;
|
||||
$temp_file_name = $o_base_dir . $o_host . "." . $temp_file_name;
|
||||
$temp_file_name = $o_base_dir . $o_host . "." . $o_port . "." . $temp_file_name;
|
||||
|
||||
# First, read entire file
|
||||
my @ret_array = read_file($temp_file_name, $n_items_check);
|
||||
|
@ -904,12 +914,12 @@ for (my $i = 0; $i < $num_int; $i++) {
|
|||
$warn_factor /= $speed_real;
|
||||
$warn_factor *= 100; # now turn into displayed % : 0,1 = 10%
|
||||
}
|
||||
$perf_out .= "'" . $descr[$i] . "_in_prct'=";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_prct'=";
|
||||
$perf_out .= sprintf("%.0f", $checkperf_out_raw[0] * 800 / $speed_real) . "%;";
|
||||
$perf_out .= ($o_warn[0] != 0) ? sprintf("%.0f", $o_warn[0] * $warn_factor) . ";" : ";";
|
||||
$perf_out .= ($o_crit[0] != 0) ? sprintf("%.0f", $o_crit[0] * $warn_factor) . ";" : ";";
|
||||
$perf_out .= "0;100 ";
|
||||
$perf_out .= "'" . $descr[$i] . "_out_prct'=";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_prct'=";
|
||||
$perf_out .= sprintf("%.0f", $checkperf_out_raw[1] * 800 / $speed_real) . "%;";
|
||||
$perf_out .= ($o_warn[1] != 0) ? sprintf("%.0f", $o_warn[1] * $warn_factor) . ";" : ";";
|
||||
$perf_out .= ($o_crit[1] != 0) ? sprintf("%.0f", $o_crit[1] * $warn_factor) . ";" : ";";
|
||||
|
@ -925,12 +935,12 @@ for (my $i = 0; $i < $num_int; $i++) {
|
|||
} else { # just convert from K|M|G bps
|
||||
$warn_factor = (defined($o_meg)) ? 1000000 : (defined($o_gig)) ? 1000000000 : 1000;
|
||||
}
|
||||
$perf_out .= "'" . $descr[$i] . "_in_bps'=";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_bps'=";
|
||||
$perf_out .= sprintf("%.0f", $checkperf_out_raw[0] * 8) . ";";
|
||||
$perf_out .= ($o_warn[0] != 0) ? $o_warn[0] * $warn_factor . ";" : ";";
|
||||
$perf_out .= ($o_crit[0] != 0) ? $o_crit[0] * $warn_factor . ";" : ";";
|
||||
$perf_out .= "0;" . $speed_real . " ";
|
||||
$perf_out .= "'" . $descr[$i] . "_out_bps'=";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_bps'=";
|
||||
$perf_out .= sprintf("%.0f", $checkperf_out_raw[1] * 8) . ";";
|
||||
$perf_out .= ($o_warn[1] != 0) ? $o_warn[1] * $warn_factor . ";" : ";";
|
||||
$perf_out .= ($o_crit[1] != 0) ? $o_crit[1] * $warn_factor . ";" : ";";
|
||||
|
@ -942,28 +952,32 @@ for (my $i = 0; $i < $num_int; $i++) {
|
|||
} else { # just convert from K|M|G bps
|
||||
$warn_factor = (defined($o_meg)) ? 1048576 : (defined($o_gig)) ? 1073741824 : 1024;
|
||||
}
|
||||
$perf_out .= "'" . $descr[$i] . "_in_Bps'=" . sprintf("%.0f", $checkperf_out_raw[0]) . ";";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_Bps'=" . sprintf("%.0f", $checkperf_out_raw[0]) . ";";
|
||||
$perf_out .= ($o_warn[0] != 0) ? $o_warn[0] * $warn_factor . ";" : ";";
|
||||
$perf_out .= ($o_crit[0] != 0) ? $o_crit[0] * $warn_factor . ";" : ";";
|
||||
$perf_out .= "0;" . $speed_real / 8 . " ";
|
||||
$perf_out .= "'" . $descr[$i] . "_out_Bps'=" . sprintf("%.0f", $checkperf_out_raw[1]) . ";";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_Bps'=" . sprintf("%.0f", $checkperf_out_raw[1]) . ";";
|
||||
$perf_out .= ($o_warn[1] != 0) ? $o_warn[1] * $warn_factor . ";" : ";";
|
||||
$perf_out .= ($o_crit[1] != 0) ? $o_crit[1] * $warn_factor . ";" : ";";
|
||||
$perf_out .= "0;" . $speed_real / 8 . " ";
|
||||
}
|
||||
}
|
||||
} else { # output in octet counter
|
||||
$perf_out .= "'" . $descr[$i] . "_in_octet'=" . $$result{ $oid_perf_inoct[$i] } . "c ";
|
||||
$perf_out .= "'" . $descr[$i] . "_out_octet'=" . $$result{ $oid_perf_outoct[$i] } . "c ";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_octet'=" . $$result{ $oid_perf_inoct[$i] } . "c ";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_octet'=" . $$result{ $oid_perf_outoct[$i] } . "c ";
|
||||
}
|
||||
if (defined($o_perfe)) {
|
||||
$perf_out .= "'" . $descr[$i] . "_in_error'=" . $$result{ $oid_perf_inerr[$i] } . "c ";
|
||||
$perf_out .= "'" . $descr[$i] . "_in_discard'=" . $$result{ $oid_perf_indisc[$i] } . "c ";
|
||||
$perf_out .= "'" . $descr[$i] . "_out_error'=" . $$result{ $oid_perf_outerr[$i] } . "c ";
|
||||
$perf_out .= "'" . $descr[$i] . "_out_discard'=" . $$result{ $oid_perf_outdisc[$i] } . "c ";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_error'=" . $$result{ $oid_perf_inerr[$i] } . "c ";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_in_discard'=" . $$result{ $oid_perf_indisc[$i] } . "c ";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_error'=" . $$result{ $oid_perf_outerr[$i] } . "c ";
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_out_discard'=" . $$result{ $oid_perf_outdisc[$i] } . "c ";
|
||||
}
|
||||
if (defined($o_perfs)) {
|
||||
$perf_out .= "'" . $descr[$i] . "_speed_bps'=" . $speed_real;
|
||||
$perf_out .= "'" . $descr[$i] =~ s/\./_/r . "_speed_bps'=" . $speed_real . " ";
|
||||
}
|
||||
if (defined($o_weather) && $usable_data == 1) {
|
||||
$perf_out .= "in=" . sprintf("%.0f", $checkperf_out_raw[0]) . ";;;0;" . sprintf("%.0f", $speed_real / 8) . " ";
|
||||
$perf_out .= "out=" . sprintf("%.0f", $checkperf_out_raw[1]) . ";;;0;" . sprintf("%.0f", $speed_real / 8) . " ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ my $lp_port = "1.3.6.1.4.1.89.35.1.38.1.1.15"; # nhr users
|
|||
|
||||
# Globals
|
||||
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
my $o_host = undef; # hostname
|
||||
my $o_community = undef; # community
|
||||
|
@ -210,6 +210,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
@ -220,6 +221,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl -w
|
||||
############################## check_snmp_load #################
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
# Date : Oct 12 2007
|
||||
# Author : Patrick Proy ( patrick at proy.org)
|
||||
|
@ -44,6 +44,12 @@ my $ciscocata_cpu_5m = ".1.3.6.1.4.1.9.9.109.1.1.1.1.5.9"; # Cisco CPU load (
|
|||
my $ciscocata_cpu_1m = ".1.3.6.1.4.1.9.9.109.1.1.1.1.3.9"; # Cisco CPU load (1min %)
|
||||
my $ciscocata_cpu_5s = ".1.3.6.1.4.1.9.9.109.1.1.1.1.4.9"; # Cisco CPU load (5sec %)
|
||||
|
||||
# Cisco small business (SG500) cpu/load
|
||||
|
||||
my $cisg_cpu_5m = "1.3.6.1.4.1.9.6.1.101.1.9.0"; # Cisco CPU load (5min %)
|
||||
my $cisg_cpu_1m = "1.3.6.1.4.1.9.6.1.101.1.8.0"; # Cisco CPU load (1min %)
|
||||
my $cisg_cpu_5s = "1.3.6.1.4.1.9.6.1.101.1.7.0"; # Cisco CPU load (5sec %)
|
||||
|
||||
# Netscreen cpu/load
|
||||
|
||||
my $nsc_cpu_5m = "1.3.6.1.4.1.3224.16.1.4.0"; # NS CPU load (5min %)
|
||||
|
@ -89,7 +95,7 @@ my $hpux_load_15_min = "1.3.6.1.4.1.11.2.3.1.1.5.0";
|
|||
|
||||
# valid values
|
||||
my @valid_types
|
||||
= ("stand", "netsc", "netsl", "as400", "cisco", "cata", "nsc", "fg", "bc", "nokia", "hp", "lp", "hpux", "n5k");
|
||||
= ("stand", "netsc", "netsl", "as400", "cisco", "cata", "cisg", "nsc", "fg", "bc", "nokia", "hp", "lp", "hpux", "n5k");
|
||||
|
||||
# CPU OID array
|
||||
my %cpu_oid = (
|
||||
|
@ -107,7 +113,7 @@ my $o_help = undef; # wan't some help ?
|
|||
my $o_verb = undef; # verbose mode
|
||||
my $o_version = undef; # print version
|
||||
|
||||
# check type : stand | netsc | netsl | as400 | cisco | cata | nsc | fg | bc | nokia | hp | lp | hpux
|
||||
# check type : stand | netsc | netsl | as400 | cisco | cata | cisg | nsc | fg | bc | nokia | hp | lp | hpux
|
||||
my $o_check_type = "stand";
|
||||
|
||||
# End compatibility
|
||||
|
@ -133,7 +139,7 @@ sub p_version { print "check_snmp_load version : $VERSION\n"; }
|
|||
|
||||
sub print_usage {
|
||||
print
|
||||
"Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -w <warn level> -c <crit level> -T=[stand|netsl|netsc|as400|cisco|cata|nsc|fg|bc|nokia|hp|lp|hpux] [-f] [-t <timeout>] [-V]\n";
|
||||
"Usage: $0 [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] [-P <protocol>] -w <warn level> -c <crit level> -T=[stand|netsl|netsc|as400|cisco|cata|cisg|nsc|fg|bc|nokia|hp|lp|hpux] [-f] [-t <timeout>] [-V]\n";
|
||||
}
|
||||
|
||||
sub isnnum { # Return true if arg is not a number
|
||||
|
@ -182,7 +188,7 @@ sub help {
|
|||
critical level for cpu in percent (on one minute)
|
||||
1 value check : critical level for cpu in percent (on one minute)
|
||||
3 value check : comma separated level for load or cpu for 1min, 5min, 15min
|
||||
-T, --type=stand|netsl|netsc|as400|cisco|bc|nokia|hp|lp
|
||||
-T, --type=stand|netsl|netsc|as400|cisco|cisg|bc|nokia|hp|lp
|
||||
CPU check :
|
||||
stand : standard MIBII (works with Windows),
|
||||
can handle multiple CPU.
|
||||
|
@ -192,6 +198,7 @@ sub help {
|
|||
cisco : Cisco CPU usage
|
||||
n5k : Cisco Nexus CPU Usage
|
||||
cata : Cisco catalyst CPU usage
|
||||
cisg : Cisco small business (SG500) CPU usage (1,5 & 15 minutes values)
|
||||
nsc : NetScreen CPU usage
|
||||
fg : Fortigate CPU usage
|
||||
bc : Bluecoat CPU usage
|
||||
|
@ -315,6 +322,7 @@ sub check_options {
|
|||
if ( ($o_check_type eq "netsl")
|
||||
|| ($o_check_type eq "cisco")
|
||||
|| ($o_check_type eq "cata")
|
||||
|| ($o_check_type eq "cisg")
|
||||
|| ($o_check_type eq "nsc")
|
||||
|| ($o_check_type eq "hpux"))
|
||||
{
|
||||
|
@ -390,6 +398,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
@ -401,6 +410,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
@ -681,6 +691,64 @@ if ($o_check_type eq "cata") {
|
|||
exit $exit_val;
|
||||
}
|
||||
|
||||
############## Cisco SG CPU check ################
|
||||
|
||||
if ($o_check_type eq "cisg") {
|
||||
my @oidlists = ($cisg_cpu_5m, $cisg_cpu_1m, $cisg_cpu_5s);
|
||||
my $resultat
|
||||
= (is_legacy_snmp_version())
|
||||
? $session->get_request(@oidlists)
|
||||
: $session->get_request(-varbindlist => \@oidlists);
|
||||
|
||||
if (!defined($resultat)) {
|
||||
printf("ERROR: Description table : %s.\n", $session->error);
|
||||
$session->close;
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
$session->close;
|
||||
|
||||
if (!defined($$resultat{$cisg_cpu_5s})) {
|
||||
print "No CPU information : UNKNOWN\n";
|
||||
exit $ERRORS{"UNKNOWN"};
|
||||
}
|
||||
|
||||
my @load = undef;
|
||||
|
||||
$load[0] = $$resultat{$cisg_cpu_5s};
|
||||
$load[1] = $$resultat{$cisg_cpu_1m};
|
||||
$load[2] = $$resultat{$cisg_cpu_5m};
|
||||
|
||||
print "CPU : $load[0] $load[1] $load[2] :";
|
||||
|
||||
$exit_val = $ERRORS{"OK"};
|
||||
for (my $i = 0; $i < 3; $i++) {
|
||||
if ($load[$i] > $o_critL[$i]) {
|
||||
print " $load[$i] > $o_critL[$i] : CRITICAL";
|
||||
$exit_val = $ERRORS{"CRITICAL"};
|
||||
}
|
||||
if ($load[$i] > $o_warnL[$i]) {
|
||||
|
||||
# output warn error only if no critical was found
|
||||
if ($exit_val eq $ERRORS{"OK"}) {
|
||||
print " $load[$i] > $o_warnL[$i] : WARNING";
|
||||
$exit_val = $ERRORS{"WARNING"};
|
||||
}
|
||||
}
|
||||
}
|
||||
print " OK" if ($exit_val eq $ERRORS{"OK"});
|
||||
if (defined($o_perf)) {
|
||||
print " | load_5_sec=$load[0]%;$o_warnL[0];$o_critL[0] ";
|
||||
print "load_1_min=$load[1]%;$o_warnL[1];$o_critL[1] ";
|
||||
print "load_5_min=$load[2]%;$o_warnL[2];$o_critL[2]\n";
|
||||
} else {
|
||||
print "\n";
|
||||
}
|
||||
|
||||
exit $exit_val;
|
||||
}
|
||||
|
||||
|
||||
############## Netscreen CPU check ################
|
||||
|
||||
if ($o_check_type eq "nsc") {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl -w
|
||||
############################## check_snmp_mem ##############
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
# Date : 17 October 2007
|
||||
# Author : Patrick Proy (nagios at proy.org)
|
||||
|
@ -156,7 +156,7 @@ sub help {
|
|||
-I, --cisco
|
||||
check cisco memory (sum of all memory pools)
|
||||
-E, --hp
|
||||
check HP proccurve memory
|
||||
check HP Procurve memory
|
||||
-f, --perfdata
|
||||
Performance data output
|
||||
-t, --timeout=INTEGER
|
||||
|
|
|
@ -37,7 +37,7 @@ my $ns_rsa_oper_second = ".1.3.6.1.4.1.14020.1.1.3.4.0;"; # number of RSA operat
|
|||
|
||||
# Globals
|
||||
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
my $o_host = undef; # hostname
|
||||
my $o_community = undef; # community
|
||||
|
@ -265,6 +265,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthNoPriv login : $o_login, $o_authproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
@ -275,6 +276,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 AuthPriv login : $o_login, $o_authproto, $o_privproto");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl -w
|
||||
############################## check_snmp_process ##############
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
# Date : Oct 12 2007
|
||||
# Author : Patrick Proy (patrick at proy dot org)
|
||||
|
|
|
@ -53,7 +53,7 @@ $hrStorage{"1.3.6.1.2.1.25.2.1.10"} = 'NetworkDisk';
|
|||
# Globals
|
||||
|
||||
my $Name = 'check_snmp_storage';
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
my $o_host = undef; # hostname
|
||||
my $o_community = undef; # community
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl -w
|
||||
############################## check_snmp_vrrp ##############
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
# Date : Oct 17 2007
|
||||
# Author : Patrick Proy (patrick at proy.org)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl -w
|
||||
############################## check_snmp_win ##############
|
||||
my $VERSION = "2.0.0";
|
||||
my $VERSION = "2.1.0";
|
||||
|
||||
# Date : Oct 12 2007
|
||||
# Author : Patrick Proy (patrick at proy.org)
|
||||
|
@ -247,6 +247,7 @@ if (defined($o_login) && defined($o_passwd)) {
|
|||
verb("SNMPv3 login");
|
||||
($session, $error) = Net::SNMP->session(
|
||||
-hostname => $o_host,
|
||||
-port => $o_port,
|
||||
-version => '3',
|
||||
-username => $o_login,
|
||||
-authpassword => $o_passwd,
|
||||
|
|
|
@ -1,256 +0,0 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Nagios plugins</TITLE>
|
||||
<META NAME="Keywords" CONTENT="nagios,plugins,perl,snmp,proy">
|
||||
<STYLE type="text/css">
|
||||
<!--
|
||||
.Default { font-family: verdana,arial,serif; font-size: 10pt; }
|
||||
.ProgramTitle { font-family: verdana,arial,serif; font-size: 18pt; font-weight: bold;}
|
||||
.Copyright { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
.Email { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
.NewsItem { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
.NewsItemOdd { font-family: verdana,arial,serif; font-size: 8pt; background-color: #DBDBDB;}
|
||||
.NewsItemEven { font-family: verdana,arial,serif; font-size: 8pt; background-color: #C4C2C2;}
|
||||
.NewsItemUrgent { font-family: verdana,arial,serif; font-size: 8pt; background-color: #ccff99;}
|
||||
.NewsItemDate { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
|
||||
.SectionTitle { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; text-decoration: underline;}
|
||||
.SectionBody { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
.ModificationDate { font-family: verdana,arial,serif; font-size: 7pt; }
|
||||
.Disclaimer { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
A.SideNavBarItem { font-family: verdana,arial,serif; background-color : black; color: #e7e7e7; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarHotItem { font-family: verdana,arial,serif; background-color : black; color: #ffcc66; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarHotItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
|
||||
<body background="img/sideback.jpg" bgcolor="#FFFFFF" text="black" class="Default">
|
||||
|
||||
<!-- background="img/sideback.jpg" -->
|
||||
|
||||
<table border="0" height="1477">
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<!-- Begin Side Bar -->
|
||||
|
||||
<table border="0" width="125" valign=top>
|
||||
<tr>
|
||||
<td><a href="http://nagios.manubulon.com/" class="SideNavBarItem" >Home</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><BR>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- End Side Bar -->
|
||||
|
||||
</td>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<table border="0" valign=top height="1452">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="ProgramTitle"> FAQ</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="NewsItemDate"> </p>
|
||||
|
||||
<p class="SectionTitle"> Last update : May 25 2007</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="top">
|
||||
|
||||
<p class="SectionTitle"> </p>
|
||||
<p class="SectionTitle"><b>FIRST, </b>look at the web page associated
|
||||
with every script.</p>
|
||||
<p class="SectionBody"><b>Running the scripts :</b></p>
|
||||
<p class="SectionBody">- <a href="#FAQ1">The scripts outputs "Can't
|
||||
locate Net/SNMP.pm in @INC....."</a></p>
|
||||
<p class="SectionBody">-<a href="#FAQ2"> How do I install Net::SNMP
|
||||
perl module</a></p>
|
||||
<p class="SectionBody">- <a href="#FAQ3">What are the supported platforms
|
||||
to run the scripts on ?</a></p>
|
||||
<p class="SectionBody">- <a href="#FAQ4">How do I get help on the
|
||||
options ?</a></p>
|
||||
<p class="SectionBody">- <a href="#FAQ5">Return code of X is out of
|
||||
bounds</a></p>
|
||||
<p class="SectionBody">- <a href="#FAQ6">Are these plugins compatible
|
||||
with Nagios 2.0 ?</a></p>
|
||||
<p class="SectionBody">- <a href="#FAQ7"> ERROR: XXXXXX : Expected
|
||||
OBJECT IDENTIFIER in dotted notation. </a></p>
|
||||
<p class="SectionBody">- <a href="#FAQ8">"No Output" using
|
||||
Nagios 2</a></p>
|
||||
<p class="SectionBody">- <a href="#FAQ9">Getting : "ERROR: Size
|
||||
table :Message size exceeded buffer maxMsgSize"</a></p>
|
||||
<p class="SectionBody">- <a href="#FAQ10">No usable data on file (X rows)</a></p>
|
||||
<p class="SectionBody"><b>Misc<br>
|
||||
</b></p>
|
||||
<p class="SectionBody">- <a href="#FAQM3">Are these scripts secure
|
||||
?</a></p>
|
||||
<p class="SectionBody">- <a href="#FAQM1">How can I get help ? Is
|
||||
there a mailling list ? a forum ?</a></p>
|
||||
<p class="SectionBody">- <a href="#FAQM2">Can I donate to help this
|
||||
project ?</a></p>
|
||||
<hr>
|
||||
<p class="SectionTitle"><a name="FAQ1"></a>The scripts outputs "Can't
|
||||
locate Net/SNMP.pm in @INC....."</p>
|
||||
<p class="SectionBody">You don't have Net::SNMP installed, see below</p>
|
||||
<p class="SectionTitle"><a name="FAQ2"></a>How do I install Net::SNMP
|
||||
perl module ?</p>
|
||||
<p class="SectionBody">There are 2 ways of doing this </p>
|
||||
<p class="SectionBody"><b>1) By CPAN (best)</b></p>
|
||||
<p class="SectionBody">on command line, as root : <br>
|
||||
<br>
|
||||
[your_host]# <b>perl -MCPAN -e shell</b><br>
|
||||
cpan shell -- CPAN exploration and modules installation (v1.76)<br>
|
||||
ReadLine support enabled<br>
|
||||
cpan> <b>install Net::SNMP</b><br>
|
||||
</p>
|
||||
<p class="SectionBody">If it's the first time you run CPAN, it will
|
||||
probably ask you some (simple) questions.</p>
|
||||
<p class="SectionBody">CPAN will also ask you to satisfy some dependencies
|
||||
(Crypt::DES, Digest::MD5, etc..).</p>
|
||||
<p class="SectionBody"><b>2) "By hand"</b><br>
|
||||
</p>
|
||||
<p class="SectionBody">Get the folowings modules (tar.gz format) on
|
||||
<a href="http://www.cpan.org">www.cpan.org</a></p>
|
||||
<p class="SectionBody">- Crypt::DES<br>
|
||||
- Digest::MD5<br>
|
||||
- Digest::SHA1<br>
|
||||
- Digest::HMAC<br>
|
||||
- Net::SNMP<br>
|
||||
<br>
|
||||
for each one (you must install Net::SNMP at the end) : <br>
|
||||
<b>tar zxf <module>.tar.gz<br>
|
||||
cd <module><br>
|
||||
perl Makefile.pl<br>
|
||||
make test<br>
|
||||
make install</b></p>
|
||||
<p class="SectionTitle"><a name="FAQ3"></a>What are the supported
|
||||
platforms to run the scripts on ?</p>
|
||||
<p class="SectionBody">Most Linux, maybe some unixes and maybe Cygwin.<br>
|
||||
Actually anything you can run perl on.<br>
|
||||
If you can install the latest Net::SNMP module, then the perl version
|
||||
should be OK.</p>
|
||||
<p class="SectionTitle"><a name="FAQ4"></a>How do I get help on the
|
||||
options ?</p>
|
||||
<p class="SectionBody">Just run <b><script> -h </b>on the command
|
||||
line.<br>
|
||||
<br>
|
||||
</p>
|
||||
<p class="SectionTitle"><a name="FAQ5"></a>Return code of X is out
|
||||
of bounds</p>
|
||||
<p class="SectionBody">Have a look at : <a href="http://www.nagios.org/faqs/viewfaq.php?faq_id=17">http://www.nagios.org/faqs/viewfaq.php?faq_id=17</a></p>
|
||||
<p class="SectionBody">In case of return code 127, try putting perl
|
||||
in the command line definition : </p>
|
||||
<p class="SectionBody"> define command{<br>
|
||||
command_name check_disk<br>
|
||||
command_line <b>/usr/bin/perl</b> $USER1$/check_snmp_storage.pl
|
||||
-C $ARG1$ [........]<br>
|
||||
}<br>
|
||||
</p>
|
||||
<p class="SectionTitle"><a name="FAQ6"></a>Are these plugins compatible
|
||||
with Nagios 2.0 ?</p>
|
||||
<p class="SectionBody">Yes.</p>
|
||||
<p class="SectionTitle"><a name="FAQ7"></a>ERROR: XXXXXX : Expected OBJECT IDENTIFIER in dotted notation.
|
||||
</p>
|
||||
<p class="SectionBody">Upgrade your Net::SNMP module version (5 is good, 4 maybe OK, 3 gives this error) <br>
|
||||
This happens with Debian Woody (Net::SNMP version 3.6).<br>
|
||||
I have special patches if you can't upgrade : contact me.</p>
|
||||
<p class="SectionTitle"><a name="FAQ8"></a>"No Output" using
|
||||
Nagios 2</p>
|
||||
<p class="SectionBody">It's a "bug" of embeded perl. It
|
||||
has been corrected in latest Nagios releases.</p>
|
||||
<p class="SectionBody">You can :<br>
|
||||
</p>
|
||||
<p class="SectionBody">- Add a patch if your nagios release is old.
|
||||
Here is a patch made by Gavin Carr for the p1.pl file to correct
|
||||
this (it should be in nagios CVS shortly). <a href="http://nagios.manubulon.com/p1-print.pl.patch">http://nagios.manubulon.com/p1-print.pl.patch</a>
|
||||
</p>
|
||||
<p class="SectionBody">- Upgrade Nagios.<br>
|
||||
<br>
|
||||
- add "/usr/bin/perl" before the script command so Nagios
|
||||
won't use embeded perl. </p>
|
||||
<p class="SectionTitle"><a name="FAQ9"></a>Getting : "ERROR:
|
||||
Size table :Message size exceeded buffer maxMsgSize"</p>
|
||||
<p class="SectionBody">Your snmp table is too big.</p>
|
||||
<p class="SectionBody">Some of my scripts (check_snmp_storage and
|
||||
check_snmp_process) now have an option (-o) to set this directly
|
||||
on command line (thx to Makina Corpus for the patch).</p>
|
||||
<p class="SectionBody">In other scripts, try adding :</p>
|
||||
<p class="SectionBody"> $session->max_msg_size(5000);<br>
|
||||
</p>
|
||||
<p class="SectionBody">After the session has been initialized. </p>
|
||||
<p class="SectionTitle"><a name="FAQ10"></a>No usable data on file (X rows)</p>
|
||||
<p class="SectionBody">Scripts like check_snmp_int need to store data when they get a SNMP counter so they can outpout readable data like bandwidth, cpu, etc....</p>
|
||||
<p class="SectionBody">For example, to output a bandwidth with an octet counter, check_snmp_int will store data every time it is run. It will also read the previous data, and try to get data old enough to make a correct average. By default, it needs data which was produced 5 minutes ago.</p>
|
||||
<p class="SectionBody">So, when you first run the script - or if you run it a long time ago -, it won't be able to get data old enough and will report an error (UNKNOWN status) saying the is "no usable data on file (X rows)".<br>
|
||||
If you leave the 5 minutes default delta value, the script will need data wich is : <br>
|
||||
- At least 4 minutes and 30 seconds old (5 min - 10%)<br>
|
||||
- At most 15 minutes old (3 * 5 min) </p>
|
||||
<p class="SectionBody">You can change this 5 minutes value using the '-d <sec>' option. The script will then look for data which is at least <sec>-10% old and at most 3*<sec>. </p>
|
||||
<p class="SectionBody">This option will only tell to make an average on <sec> seconds, you can run the service every minute with Nagios, it will always get the newest value which is at least <sec>-10% old.<br>
|
||||
The only thing you must check is that your service will at least run every 15 minutes, or the script will always output "unknown" as the value will be too old for him. </p>
|
||||
<p class="SectionTitle"><br>
|
||||
<a name="FAQM3"></a>Are these scripts secure ?</p>
|
||||
<p class="SectionBody">Not at all ! You must secure the Nagios server.<br>
|
||||
Nobody else than the nagios user should be allowed to even think
|
||||
about running these scripts.<br>
|
||||
</p>
|
||||
<p class="SectionTitle"><a name="FAQM1"></a>How can I get help ? Is
|
||||
there a mailling list ? a forum ?</p>
|
||||
<p class="SectionBody">Go to the sourceforge project page for all this : <a href=http://sourceforge.net/projects/nagios-snmp/>Nagios-snmp</a>
|
||||
<p class="SectionBody"><a name="FAQM2"></a><span class="SectionTitle">Can
|
||||
I donate to help this project ?</span></p>
|
||||
<p class="SectionBody">Of course you can, I just haven't got any idea
|
||||
of how, so just send a postcard to my son (Jolan) with a nice drawing (or buy a cookie to your son/daughter/nephew/grand-ma...).<br>
|
||||
You can get my postal address on my resume (<a href="http://www.manubulon.com/cvpproy.htm">www.manubulon.com/cvpproy.htm</a>).<br>
|
||||
He will answer you when he knows how to write (in several years).</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="SectionBody">This project is also hosted by : <br>
|
||||
|
||||
<A href="http://sourceforge.net/projects/nagios-snmp/"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
</p></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p> </p>
|
||||
|
||||
</BODY>
|
||||
|
||||
</HTML>
|
||||
|
|
@ -1,431 +0,0 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Nagios plugins</TITLE>
|
||||
<META NAME="Keywords" CONTENT="nagios,plugins,perl,snmp,proy">
|
||||
<STYLE type="text/css">
|
||||
<!--
|
||||
.Default { font-family: verdana,arial,serif; font-size: 10pt; }
|
||||
.ProgramTitle { font-family: verdana,arial,serif; font-size: 18pt; font-weight: bold;}
|
||||
.Copyright { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
.Email { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
.NewsItem { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
.NewsItemOdd { font-family: verdana,arial,serif; font-size: 8pt; background-color: #DBDBDB;}
|
||||
.NewsItemEven { font-family: verdana,arial,serif; font-size: 8pt; background-color: #C4C2C2;}
|
||||
.NewsItemUrgent { font-family: verdana,arial,serif; font-size: 8pt; background-color: #ccff99;}
|
||||
.NewsItemDate { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
|
||||
.SectionTitle { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; text-decoration: underline;}
|
||||
.SectionBody { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
.ModificationDate { font-family: verdana,arial,serif; font-size: 7pt; }
|
||||
.Disclaimer { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
A.SideNavBarItem { font-family: verdana,arial,serif; background-color : black; color: #e7e7e7; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarHotItem { font-family: verdana,arial,serif; background-color : black; color: #ffcc66; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarHotItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<body background="img/sideback.jpg" bgcolor="#FFFFFF" text="black" class="Default">
|
||||
<table width="100%" border="0">
|
||||
<tr>
|
||||
<td width="127" valign=top height="1448">
|
||||
<!-- Begin Side Bar -->
|
||||
<table border="0" width="125" valign=top>
|
||||
<tr>
|
||||
<td><a class="SideNavBarHotItem" >This site :</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://nagios.manubulon.com/" class="SideNavBarItem" >Home</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="index_snmp.html" class="SideNavBarItem" >Nagios plugins</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="index_info.html" class="SideNavBarItem" >Info on snmp</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="index_commands.html" class="SideNavBarItem" > Nagios config</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="faq.html" class="SideNavBarItem" > FAQ</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> <a href="http://sourceforge.net/projects/nagios-snmp/" class="SideNavBarItem" >
|
||||
Project page on SourceForge</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#FFFFFF">-----------</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="SideNavBarHotItem" >Links :</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.nagios.org/" class="SideNavBarItem" >Nagios
|
||||
Home</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://sourceforge.net/projects/nagiosplugins" class="SideNavBarItem" >Nagios
|
||||
Plugins</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.oreon.org" class="SideNavBarItem" >Oreon project</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://www.nagiosexchange.org" class="SideNavBarItem" >NagiosExchange</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://forums.opsyx.com/viewforum.php?f=1" class="SideNavBarItem" >Opsyx
|
||||
forum</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://forum.2037.org/" class="SideNavBarItem" >Forum 2037</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color="#FFFFFF">-----------</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> <A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=3" width="110" height="37" border="0" alt="SourceForge.net Logo" /></A>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Side Bar -->
|
||||
</td>
|
||||
<td valign=top>
|
||||
<table width="100%" border="0" valign=top>
|
||||
<tr>
|
||||
<td class="ProgramTitle"> My plugins for <img src="img/smalllogo7.jpg" border="0" alt="Nagios">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="SectionTitle" align="right">Last update : Jun 9 2007</p>
|
||||
<p class="SectionTitle" align="left">About </p>
|
||||
<p class="SectionBody">The general idea of these scripts is to check
|
||||
as many things as possible with snmp (how do you install NRPE on
|
||||
Cisco or AS/400 ?) : disks, memory, load, interface, running procsses,
|
||||
etc...<br>
|
||||
</p>
|
||||
<p class="SectionBody">The other idea is to select disks, interfaces,
|
||||
process using regular expressions <br>
|
||||
<br>
|
||||
- it is possible to test more than one disk/int/process in one Nagios
|
||||
check (ex : eth* instead of eth0,eth1,eth2,...)<br>
|
||||
<br>
|
||||
- you only have to provide a unique part of the name to select a
|
||||
disk/int/process (ex : "C:" instead of "C:\ Label:
|
||||
Serial Number xxxxxxx" makes it easy to use on multiple Windows
|
||||
hosts). </p>
|
||||
<p class="SectionBody">Most of these scripts can make performance
|
||||
outputs. </p>
|
||||
<p class="SectionBody">Enjoy and give me feedback !<br>
|
||||
<br>
|
||||
All code here is under GPL licence. <br>
|
||||
</p>
|
||||
<p class="SectionTitle"> If you want to be informed when I release
|
||||
new versions, <br>
|
||||
or if you have some advices, feedback, questions, go to the project's
|
||||
sourceforge page : <a href="http://sourceforge.net/projects/nagios-snmp">nagios-snmp</a></p>
|
||||
<p class="SectionBody">Please send me your feedback : <br>
|
||||
- Test with embeded Perl<br>
|
||||
- Test on various systems<br>
|
||||
- Bugs, advices, comments, RFE, etc...<br>
|
||||
Thank you !</p>
|
||||
<p class="SectionBody">Run the scripts with '-h' to get help.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<p class="SectionTitle"> </p>
|
||||
<p class="SectionTitle">Requirements</p>
|
||||
<p class="SectionBody"> - Perl in /usr/bin/perl - if not run 'perl
|
||||
script' or change the path in the scripts first line <br>
|
||||
- Net::SNMP<br>
|
||||
- file 'utils.pm' in diretory /usr/local/icinga/libexec or change
|
||||
the line "use libs /usr/local/icinga/libexec/" in the scripts<br>
|
||||
</p>
|
||||
<p class="SectionBody"><a href="index_commands.html" class="SectionTitle">Configurations
|
||||
examples</a></p>
|
||||
<p class="SectionTitle">Plugins<br>
|
||||
</p>
|
||||
<table border="1" cellspacing="5">
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top>Bundle of all plugins</td>
|
||||
<td class="SectionBody">
|
||||
<p>Version 1.1.1 : <a href="nagios-snmp-plugins.1.1.1.tgz">nagios-snmp-plugins.1.1.1.tgz</a></p>
|
||||
<p>This bundle contains all the plugins, including an install
|
||||
script useful if you have special Nagios or perl paths.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top>
|
||||
<p><a href="snmp_storage.html">check_snmp_storage</a><br>
|
||||
<br>
|
||||
<p> Download version <a href="check_snmp_storage.pl">1.3.3</a></p>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>This scripts checks by snmp (1,2c,3) disks, memory, swap,
|
||||
everthing in hrStorage table. <br>
|
||||
Disk selection can be done by perl regexp on description,
|
||||
index or type to select one or multiple storages.<br>
|
||||
<br>
|
||||
Vérifie par snmp v1 ou v3 (merci à V. Carpentier)
|
||||
l'occupation des disques, mais aussi de la swap, de la mémoire,
|
||||
etc.. tout ce qui est disponible en snmp par la table hrStorage.<br>
|
||||
Les disques sont sélectionnables par expression régulière
|
||||
compatible Perl</p>
|
||||
<p><a href="snmp_storage.html">Details</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top>
|
||||
<p><a href="snmp_int.html">check_snmp_int</a><br>
|
||||
<br>
|
||||
Download version <a href="check_snmp_int.pl">1.4.8</a></p>
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>Checks by snmp (1,2c,3) interface state and usage. Interfaces
|
||||
can be selected by regexp.<br>
|
||||
It is possible to check the input/output bandwidth and error
|
||||
rate of the interface.<br>
|
||||
<br>
|
||||
Vérifie par snmp v1 ou v3 l'état des interfaces
|
||||
d'un hôte.<br>
|
||||
Ce script permet d'utiliser des expressions régulières
|
||||
pour sélectionner les interfaces : ex 'eth' va vérifier
|
||||
eth0, eth1, ...<br>
|
||||
Il permet également de lister toutes les interfaces
|
||||
disponibles sur la machine cible (option -v). </p>
|
||||
<p><a href="snmp_int.html">Details</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top>
|
||||
<p><a href="snmp_process.html">check_snmp_process</a></p>
|
||||
<p>Download version <a href="check_snmp_process.pl">1.5<br>
|
||||
</a></p>
|
||||
<p> </p>
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>Checks by snmp (1,2c,3) the number (can be 1) of processes
|
||||
matching a perl regexp.<br>
|
||||
The script can also check memory and cpu usage of processes.</p>
|
||||
<p>Vérifie par snmp v1 ou v3 (idem) le nombre de process
|
||||
sur un hôte.<br>
|
||||
Ce script permet d'utiliser des expressions régulières
|
||||
pour sélectionner les process.<br>
|
||||
Il est également possible de vérifier l'utilisation
|
||||
mémoire et CPU de la machine.<br>
|
||||
Il permet également de lister touts les process disponibles
|
||||
sur la machine cible (option -v). </p>
|
||||
<p><a href="snmp_load.html">Details</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top>
|
||||
<p><a href="snmp_load.html">check_snmp_load</a></p>
|
||||
<p> Download version <a href="check_snmp_load.pl">1.3.2</a></p>
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>Checks by snmp (1,2c,3) cpu or average load. <br>
|
||||
Works on Linux, Windows, Cisco, AS400, HP Procurve, LinkProof,
|
||||
Blucoat, Nokia, Fortinet, Netscreen,HP-UX.</p>
|
||||
<p> Vérifie par snmp (1,2c,3) la charge ou l'ocupation
|
||||
CPU.<br>
|
||||
</p>
|
||||
<p><a href="snmp_load.html">Details.</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top>
|
||||
<p><a href="snmp_mem.html">check_snmp_mem</a></p>
|
||||
<p>Download version <a href="check_snmp_mem.pl">1.1</a></p>
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>Checks by snmp (1,2c,3) : <br>
|
||||
- Memory and swap usage on Linux/Net-snmp<br>
|
||||
- Memory usage on cisco routers or Pix<br>
|
||||
- Memory usage on HP Procurve switchs<br>
|
||||
For memory check on other OS (Windows, AS400) see the description
|
||||
page </p>
|
||||
<p>Vérifcation de <br>
|
||||
- l'utilisation mémoire et swap sur Linux/Net-snmp<br>
|
||||
- l'utilisation mémoire sur Cisco (routeurs et Pix).<br>
|
||||
- l'utilisation mémoire sur Switch Hp Procurve.<br>
|
||||
Pour d'autres SE (Windows, AS400), aller à la page
|
||||
de description.</p>
|
||||
<p><a href="snmp_mem.html">Détail</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top>
|
||||
<p><a href="snmp_vrrp.html">check_snmp_vrrp</a></p>
|
||||
<p>Download version : <a href="check_snmp_vrrp.pl">1.3</a></p>
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>Checks the vrrp state of all the interface of a host. You
|
||||
can specify if they must be master or backup.<br>
|
||||
Supported platforms : Nokia IP (vrrp & clustering), Linkproof,
|
||||
Alteon.</p>
|
||||
<p>Verifie l'état vrrp des interfaces d'un host.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top>
|
||||
<p><a href="snmp_cpfw.html">check_snmp_cpfw</a></p>
|
||||
<p>Download version : <a href="check_snmp_cpfw.pl">1.2.1</a></p>
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>Checks the state of Checkpoint Firewall-1 modules (SVN, HA,
|
||||
FW, MGMT) and active connexions (tested on NG).<br>
|
||||
Snmp extensions must be activated</p>
|
||||
<p>Vérifie l'état des modules Checkpoint Fw-1
|
||||
(HA, SVN, MGMT, FW) et les connexions actives. Testé
|
||||
sur NG-AI R55.<br>
|
||||
L'extension SNMP doit être activée sur les modules.</p>
|
||||
<p><a href="snmp_cpfw.html">Détail</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top>
|
||||
<p><a href="snmp_windows.html">check_snmp_win</a></p>
|
||||
<p>Download version : <a href="check_snmp_win.pl">0.6</a></p>
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>Checks windows services state with snmp.</p>
|
||||
<p>Véifie l'état de services Windows par snmp.</p>
|
||||
<p><a href="snmp_windows.html">Détail</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">
|
||||
<p><a href="snmp_css.html" class="NewsItemDate">check_snmp_css</a></p>
|
||||
<p><b>Download version</b> : <a href="check_snmp_css.pl">1.0</a></p>
|
||||
</td>
|
||||
<td class="SectionBody">Checks css services state</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">
|
||||
<p><a href="snmp_env.html" class="NewsItemDate">check_snmp_env</a></p>
|
||||
<p><b>Download version</b> : <a href="check_snmp_env.pl">1.2</a></p>
|
||||
</td>
|
||||
<td class="SectionBody">Checks environemental status (fan, temp,
|
||||
power supply) on Cisco, Nokia, Bluecoat, IronPort.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">
|
||||
<p class="NewsItemDate">check_snmp_nsbox</p>
|
||||
<p><b>Download versio</b>n : <a href="check_snmp_nsbox.pl">1.0</a></p>
|
||||
</td>
|
||||
<td class="SectionBody">Checks nsbox vhost & diode status.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">
|
||||
<p class="NewsItemDate">check_snmp_boostedge</p>
|
||||
<p><b>Download version</b> : <a href="check_snmp_boostedge.pl">1.0</a></p>
|
||||
</td>
|
||||
<td class="SectionBody">Checks Boostedge services</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">
|
||||
<p class="NewsItemDate">check_snmp_linkproof_nhr</p>
|
||||
<p><b>Download version</b> : <a href="check_snmp_linkproof_nhr.pl">1.0</a></p>
|
||||
</td>
|
||||
<td class="SectionBody">Checks linkproof NHR</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="SectionTitle">Compatibility matrix : </p>
|
||||
<table width="100%" border="2" class="SectionBody" cellspacing="3">
|
||||
<tr>
|
||||
<td class="SectionTitle">System</td>
|
||||
<td class="SectionTitle">check_snmp_storage</td>
|
||||
<td class="SectionTitle">check_snmp_int</td>
|
||||
<td class="SectionTitle">check_snmp_process</td>
|
||||
<td class="SectionTitle">check_snmp_mem</td>
|
||||
<td class="SectionTitle">check_snmp_load</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Linux</td>
|
||||
<td>
|
||||
<p>OK : <br>
|
||||
- '/home', '/var'<br>
|
||||
- 'Swap', 'Real Memory'<br>
|
||||
</p>
|
||||
</td>
|
||||
<td>OK : <br>
|
||||
- 'eth' <br>
|
||||
- 'ppp'</td>
|
||||
<td>OK</td>
|
||||
<td>OK (mem & swap)</td>
|
||||
<td>
|
||||
<p>OK</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Windows</td>
|
||||
<td>
|
||||
<p>OK :<br>
|
||||
- '^[CDE]:'</p>
|
||||
</td>
|
||||
<td>OK</td>
|
||||
<td>OK</td>
|
||||
<td>
|
||||
<p>NO<br>
|
||||
See check_snmp_storage for virtual mem</p>
|
||||
</td>
|
||||
<td>OK</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cisco/HP switch</td>
|
||||
<td>N/A</td>
|
||||
<td>OK :<br>
|
||||
- 'Giga' : all gigabits<br>
|
||||
- 'Fast.*0.1[1234]' : checks FastEternet0/11 to 0/14.</td>
|
||||
<td>N/A</td>
|
||||
<td>OK</td>
|
||||
<td>OK</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AS400</td>
|
||||
<td>OK :<br>
|
||||
- '-m RAM -s' to get all RAM<br>
|
||||
- 'System ASP' : Disk<br>
|
||||
</td>
|
||||
<td>OK </td>
|
||||
<td>OK</td>
|
||||
<td>
|
||||
<p>NO<br>
|
||||
See check_snmp_storage</p>
|
||||
</td>
|
||||
<td>OK</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LinkProof</td>
|
||||
<td>N/A</td>
|
||||
<td>OK</td>
|
||||
<td>N/A</td>
|
||||
<td>N/A</td>
|
||||
<td>OK</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<hr>
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
<A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
</p>
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
trademarks of Ethan Galstad.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</BODY>
|
||||
</HTML>
|
File diff suppressed because it is too large
Load diff
|
@ -1,471 +0,0 @@
|
|||
|
||||
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Nagios plugins</TITLE>
|
||||
|
||||
<META NAME="Keywords" CONTENT="nagios,plugins,perl,snmp,proy">
|
||||
|
||||
<STYLE type="text/css">
|
||||
|
||||
<!--
|
||||
|
||||
.Default { font-family: verdana,arial,serif; font-size: 10pt; }
|
||||
|
||||
.ProgramTitle { font-family: verdana,arial,serif; font-size: 18pt; font-weight: bold;}
|
||||
|
||||
.Copyright { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.Email { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.NewsItem { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.NewsItemOdd { font-family: verdana,arial,serif; font-size: 8pt; background-color: #DBDBDB;}
|
||||
|
||||
.NewsItemEven { font-family: verdana,arial,serif; font-size: 8pt; background-color: #C4C2C2;}
|
||||
|
||||
.NewsItemUrgent { font-family: verdana,arial,serif; font-size: 8pt; background-color: #ccff99;}
|
||||
|
||||
.NewsItemDate { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
|
||||
|
||||
.SectionTitle { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; text-decoration: underline;}
|
||||
|
||||
.SectionBody { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.ModificationDate { font-family: verdana,arial,serif; font-size: 7pt; }
|
||||
|
||||
.Disclaimer { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
A.SideNavBarItem { font-family: verdana,arial,serif; background-color : black; color: #e7e7e7; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem { font-family: verdana,arial,serif; background-color : black; color: #ffcc66; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
-->
|
||||
|
||||
</STYLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<body background="img/sideback.jpg" bgcolor="#FFFFFF" text="black" class="Default">
|
||||
|
||||
<!-- background="img/sideback.jpg" -->
|
||||
|
||||
<table border="0">
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<!-- Begin Side Bar -->
|
||||
|
||||
<table border="0" width="125" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><a href="http://nagios.manubulon.com/" class="SideNavBarItem" >Home</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><BR>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<!-- End Side Bar -->
|
||||
|
||||
</td>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<table border="0" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="ProgramTitle"> Snmp Checkpoint FW-1 check</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="NewsItemDate">Script : check_snmp_cpfw.pl</p>
|
||||
|
||||
<p class="SectionTitle"> Last update : April 19 2007</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="top">
|
||||
|
||||
<p class="SectionTitle">Description : </p>
|
||||
|
||||
<p class="SectionBody">Checks by snmp v1, v2c or v3 some modules of
|
||||
Checkpoint FW-1 filtering or management module :</p>
|
||||
|
||||
<p class="SectionBody">You can choose to check 1, 2, 3 or all 4 modules.
|
||||
|
||||
Each module will be checked independently and critical state will
|
||||
|
||||
be returned if one of them is not OK.</p>
|
||||
|
||||
<p class="SectionBody">- Firewall (on filtering firewall) : </p>
|
||||
|
||||
<p class="SectionBody">Checks policy state : must be installed<br>
|
||||
|
||||
Can check installed policy name : you mut provide the exact name
|
||||
|
||||
of the policy (-p = <policy name>)<br>
|
||||
|
||||
Can check connections : warning and maximum levels must be provided
|
||||
|
||||
( -c=<warn>,<crit>)</p>
|
||||
|
||||
<p class="SectionBody">- SVN</p>
|
||||
|
||||
<p class="SectionBody">Checks the svan status code (must be "OK")
|
||||
|
||||
of SVN</p>
|
||||
|
||||
<p class="SectionBody">- Management</p>
|
||||
|
||||
<p class="SectionBody">Checks the management state ("active")
|
||||
|
||||
and if management is alive.</p>
|
||||
|
||||
<p class="SectionBody">- High availability</p>
|
||||
|
||||
<p class="SectionBody">Checks the HA state : <br>
|
||||
- "active" on IPSO & master on SPLAT (default)<br>
|
||||
- "standby" on SPLAT<br>
|
||||
Use check_snmp_vrrp.pl for checks on active/standby or IPSO clusters
|
||||
on IPSO<br>
|
||||
Check the blocking state ("OK")<br>
|
||||
Checks the state of all HA softs, usually : Synchronization,Filter,
|
||||
cphad and fwd.</p>
|
||||
<p class="SectionBody"><span class="SectionTitle">SNMP Login</span><br>
|
||||
</p>
|
||||
<p class="SectionBody">See <a href="index_info.html">snmp info page</a></p>
|
||||
|
||||
<p class="SectionTitle">Requirements :</p>
|
||||
|
||||
<p class="SectionBody">- On the Checkpoint Firewall : SNMP extentions
|
||||
|
||||
must be active</p>
|
||||
|
||||
<p class="SectionBody">- Perl in /usr/bin/perl - or just run 'perl
|
||||
|
||||
script' <br>
|
||||
|
||||
- Net::SNMP<br>
|
||||
|
||||
- file 'utils.pm' in plugin diretory (/usr/local/icinga/libexec)</p>
|
||||
|
||||
<p class="SectionBody"><a href="index_commands.html" class="SectionTitle">Configurations
|
||||
|
||||
examples</a><br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"><a href="check_snmp_cpfw.pl" class="SectionTitle">Dowload
|
||||
lastest version : 1.2.1</a></p>
|
||||
|
||||
<p class="NewsItemDate"><span class="SectionTitle">Changelog</span>
|
||||
: On CVS repository on sourceforge : <a href="http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/">http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/</a>.</p>
|
||||
|
||||
<p class="SectionTitle">Examples :</p>
|
||||
|
||||
<p class="SectionBody"><br>
|
||||
|
||||
All examples below are considering the script is local directory.
|
||||
|
||||
Host to be checked is 127.0.0.1 with snmp community "public".</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
|
||||
<p>Get help
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="387">
|
||||
|
||||
<p>./check_snmp_cpfw.pl <b>-h</b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="282">snmpv3 login</td>
|
||||
|
||||
<td class="SectionBody" width="387">./check_snmp_cpfw.pl -H 127.0.0.1
|
||||
|
||||
<b>-l login -x passwd .....</b></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
|
||||
<p>Check firewall / HA / SVN - for a HA filtering module -
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="387">
|
||||
|
||||
<p>./check_snmp_cpfw.pl -H 127.0.0.1 -C public <b>-swa</b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
|
||||
<p align="right">Result example :
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="387">
|
||||
|
||||
<p>FW : OK / SVN : OK / HA : OK / CPFW Status : OK</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
|
||||
<p>Check SVN/Mgmt - for a management -
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="387">
|
||||
|
||||
<p>./check_snmp_cpfw.pl -H 127.0.0.1 -C public <b>-sm</b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
|
||||
<div align="right">Result example : </div>
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="387">SVN : OK / MGMT : OK / CPFW
|
||||
|
||||
Status : OK</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="282">Check policy
|
||||
|
||||
name </td>
|
||||
|
||||
<td class="SectionBody" width="387">./check_snmp_cpfw.pl -H 127.0.0.1
|
||||
|
||||
-C public <b>-w -p prod</b></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
|
||||
<p align="right">Result example : </p>
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="387">FW : OK / CPFW Status : OK</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
|
||||
<div align="right">Same with another policy installed : </div>
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="387">FW : Policy installed : Standard
|
||||
|
||||
/ CPFW Status : CRITICAL</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="282">Check number
|
||||
|
||||
of active connection with performance data output</td>
|
||||
|
||||
<td class="SectionBody" width="387">./check_snmp_cpfw.pl -H 127.0.0.1
|
||||
|
||||
-C public <b>-w -c 1000,5000 -f</b></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
|
||||
<div align="right">Result example : </div>
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="387">FW : OK / CPFW Status : OK
|
||||
|
||||
| fw_connexions=340</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p class="SectionBody"> </p>
|
||||
|
||||
<p class="NewsItemDate">Output of check_snmp_cpfw.pl -h</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="SectionBody" valign = top>
|
||||
<p class="SectionBody">SNMP Checkpoint FW-1 Monitor for Nagios
|
||||
version 1.2.1<br>
|
||||
GPL Licence, (c)2004-2007 - Patrick Proy
|
||||
<p>Usage: ./check_snmp_cpfw.pl [-v] -H <host> -C <snmp_community>
|
||||
[-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])
|
||||
[-s] [-w [-p=pol_name] [-c=warn,crit]] [-m] [-a [standby]
|
||||
] [-f] [-p <port>] [-t <timeout>] [-V]<br>
|
||||
-v, --verbose<br>
|
||||
print extra debugging information (including interface list
|
||||
on the system)<br>
|
||||
-h, --help<br>
|
||||
print this help message<br>
|
||||
-H, --hostname=HOST<br>
|
||||
name or IP address of host to check<br>
|
||||
-C, --community=COMMUNITY NAME<br>
|
||||
community name for the host's SNMP agent (implies v1 protocol)<br>
|
||||
2, --v2c<br>
|
||||
Use snmp v2c<br>
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD<br>
|
||||
Login and auth password for snmpv3 authentication <br>
|
||||
If no priv password exists, implies AuthNoPriv <br>
|
||||
-X, --privpass=PASSWD<br>
|
||||
Priv password for snmpv3 (AuthPriv protocol)<br>
|
||||
-L, --protocols=<authproto>,<privproto><br>
|
||||
<authproto> : Authentication protocol (md5|sha : default
|
||||
md5)<br>
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
<br>
|
||||
-s, --svn<br>
|
||||
check for svn status<br>
|
||||
-w, --fw<br>
|
||||
check for fw status<br>
|
||||
-a, --ha[=standby]<br>
|
||||
check for ha status and node in "active" state<br>
|
||||
If using SecurePlatform and monitoring a standby unit, put
|
||||
"standby" too<br>
|
||||
-m, --mgmt<br>
|
||||
check for management status<br>
|
||||
-p, --policy=POLICY_NAME<br>
|
||||
check if installed policy is POLICY_NAME (must have -w)<br>
|
||||
-c, --connexions=WARN,CRIT<br>
|
||||
check warn and critical number of connexions (must have -w)<br>
|
||||
-f, --perfparse, --perfdata<br>
|
||||
performance data output (only works with -c)<br>
|
||||
-P, --port=PORT<br>
|
||||
SNMP port (Default 161)<br>
|
||||
-t, --timeout=INTEGER<br>
|
||||
timeout for SNMP (Default: Nagios default) <br>
|
||||
-V, --version<br>
|
||||
prints version number<br>
|
||||
</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
<A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
|
||||
trademarks of Ethan Galstad.</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
|
||||
</HTML>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,381 +0,0 @@
|
|||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Nagios plugins</TITLE>
|
||||
|
||||
<META NAME="Keywords" CONTENT="nagios,plugins,perl,snmp,proy">
|
||||
|
||||
<STYLE type="text/css">
|
||||
|
||||
<!--
|
||||
|
||||
.Default { font-family: verdana,arial,serif; font-size: 10pt; }
|
||||
|
||||
.ProgramTitle { font-family: verdana,arial,serif; font-size: 18pt; font-weight: bold;}
|
||||
|
||||
.Copyright { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.Email { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.NewsItem { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.NewsItemOdd { font-family: verdana,arial,serif; font-size: 8pt; background-color: #DBDBDB;}
|
||||
|
||||
.NewsItemEven { font-family: verdana,arial,serif; font-size: 8pt; background-color: #C4C2C2;}
|
||||
|
||||
.NewsItemUrgent { font-family: verdana,arial,serif; font-size: 8pt; background-color: #ccff99;}
|
||||
|
||||
.NewsItemDate { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
|
||||
|
||||
.SectionTitle { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; text-decoration: underline;}
|
||||
|
||||
.SectionBody { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.ModificationDate { font-family: verdana,arial,serif; font-size: 7pt; }
|
||||
|
||||
.Disclaimer { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
A.SideNavBarItem { font-family: verdana,arial,serif; background-color : black; color: #e7e7e7; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem { font-family: verdana,arial,serif; background-color : black; color: #ffcc66; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
-->
|
||||
|
||||
</STYLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<body background="img/sideback.jpg" bgcolor="#FFFFFF" text="black" class="Default">
|
||||
|
||||
<!-- background="img/sideback.jpg" -->
|
||||
|
||||
<table border="0">
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<!-- Begin Side Bar -->
|
||||
|
||||
<table border="0" width="125" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><a href="http://nagios.manubulon.com/" class="SideNavBarItem" >Home</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><BR>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<!-- End Side Bar -->
|
||||
|
||||
</td>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<table border="0" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="ProgramTitle"> Snmp CSS check</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="NewsItemDate">Script : check_snmp_css.pl / check_snmp_css_main.pl</p>
|
||||
|
||||
<p class="SectionTitle"> Last update : Jan 22 2007</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="top">
|
||||
|
||||
<p class="SectionTitle">Description : </p>
|
||||
|
||||
<p class="SectionBody">Checks by snmp v1, v2c or v3 CSS services state</p>
|
||||
<p class="SectionBody"><span class="SectionTitle">SNMP Login</span><br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody">See <a href="index_info.html">snmp info page</a></p>
|
||||
|
||||
<p class="SectionTitle">Requirements :</p>
|
||||
|
||||
<p class="SectionBody"> - Perl in /usr/bin/perl - or just run 'perl
|
||||
script' <br>
|
||||
- Net::SNMP<br>
|
||||
- file 'utils.pm' in plugin diretory (/usr/local/icinga/libexec)<br>
|
||||
</p>
|
||||
<p class="SectionTitle">Checks </p>
|
||||
<p class="SectionBody">This scripts checks status of the CSS services.</p>
|
||||
<p class="SectionBody"><b class="SectionTitle">Select service(s)</b><br>
|
||||
You select services you wan't to check with -n using regular expressions</p>
|
||||
<p class="SectionBody"><b class="SectionTitle">Put thresholds</b><br>
|
||||
You select the warning and critical levels for : <num>,<resp>,<conn>
|
||||
<br>
|
||||
num : minimum number of active & alive service <br>
|
||||
resp : average response time in ms<br>
|
||||
conn : number of connexions </p>
|
||||
<p class="SectionBody">You can choose not to put 1, 2 or 3 numbers.
|
||||
<br>
|
||||
If you set "-w 3" only the number of active services will
|
||||
be checked.<br>
|
||||
If you set "-w 3,200" only the number of active services
|
||||
and response time will be checked.<br>
|
||||
<br>
|
||||
For no warnings, put -1 (ex : -w5,-1,3). <br>
|
||||
When using negative numbers, dont put space after "-w"
|
||||
: "-w -1,100,6" will not work, "-w-1,100,6"
|
||||
will work.</p>
|
||||
<p class="SectionBody"><b class="SectionTitle">-d option and check_snmp_css_main.pl</b></p>
|
||||
<p class="SectionBody">This option is set to make the script read
|
||||
the index from a file instead of on the CSS.</p>
|
||||
<p class="SectionBody">The reason of this option is :<br>
|
||||
- when you have a lot (> 50) services on the CSS <br>
|
||||
- you want to check 10 service group consisting of 5 services every
|
||||
2 minutes.</p>
|
||||
<p class="SectionBody">If you use check_snmp_css, then it will read
|
||||
the index (50 oids) + checks 5 oids = 55 OID every 12 seconds in
|
||||
average. This will heavily load the CSS.<br>
|
||||
This is why I wrote check_snmp_css_main.pl. This script will get
|
||||
the index of the CSS every 10 minutes for example (could be more)
|
||||
as the index won't change often.<br>
|
||||
Then the check_snmp_css will only have to check for the 5 oids every
|
||||
12 seconds, which will reduce by about 10 the amount of snmp queries
|
||||
!</p>
|
||||
<p class="SectionBody">How to use it :</p>
|
||||
<p class="SectionBody">Create a service with long inter-delay check
|
||||
executing : </p>
|
||||
<p class="SectionBody">check_snmp_css_main.pl -H <host> <snmp
|
||||
logins> -2 -d /var/tmp<br>
|
||||
<b>-2 </b>if for using snmpv2c (better to get a lot of data)<br>
|
||||
<b>-d /var/tmp </b>is to put the temp file to a special directory
|
||||
(default is /tmp).</p>
|
||||
<p class="SectionBody">A file named : <b>Nagios_CSS_<IP Address></b>
|
||||
will be created</p>
|
||||
<p class="SectionBody">Then you can use your check_snmp_css.pl script
|
||||
just as before but adding the '<b>-d</b>' option with the temp directory
|
||||
if not /tmp.</p>
|
||||
<p class="SectionBody">If the Nagios_CSS_<IP> file is not created
|
||||
when the check_snmp_css script runs, it will then return unknown
|
||||
status.<br>
|
||||
If the check_snmp_css_main.pl cannot read index, a warning will
|
||||
be returned but the old index file will remain.</p>
|
||||
<p class="SectionBody">A lockfile is created bye check_snmp_css_main.pl
|
||||
when it writes it's file. The check_snmp_css script will wait until
|
||||
the lock file is removed to read the index file. <br>
|
||||
The lock file is named : <b>Nagios_CSS_<IP Address>.lock<br>
|
||||
</b>The lock file format is simple: every line is in format <b>
|
||||
<br>
|
||||
<OID>:<Service name></b> </p>
|
||||
<p class="SectionBody"> </p>
|
||||
<p class="SectionBody"><a href="check_snmp_css.pl" class="SectionTitle">Dowload
|
||||
lastest version of check_snmp_css.pl : 1.0</a></p>
|
||||
<p class="SectionBody"><a href="check_snmp_css_main.pl" class="SectionTitle">Dowload
|
||||
lastest version of check_snmp_css_main.pl : 1.0</a></p>
|
||||
|
||||
<p class="SectionBody"><a href="index_commands.html" class="SectionTitle">Configurations
|
||||
|
||||
examples</a></p>
|
||||
|
||||
<p class="NewsItemDate"><span class="SectionTitle">Changelog</span>
|
||||
: On CVS repository on sourceforge : <a href="http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/">http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/</a>.</p>
|
||||
|
||||
<p class="SectionTitle">Examples :</p>
|
||||
|
||||
<p class="SectionBody"><br>
|
||||
|
||||
All examples below are considering the script is local directory.
|
||||
|
||||
Host to be checked is 127.0.0.1 with snmp community "public".</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="154">
|
||||
<p>Get help
|
||||
</td>
|
||||
<td class="SectionBody" width="420">
|
||||
<p>./check_snmp_css.pl <b>-h</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="154">Verbose output</td>
|
||||
<td class="SectionBody" width="420">./check_snmp_css.pl -H <IP>
|
||||
-C <com> <b>-v</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="154">snmpv3 login</td>
|
||||
<td class="SectionBody" width="420">./check_snmp_css.pl -H 127.0.0.1
|
||||
-l login -x passwd<b></b></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p class="NewsItemDate">Output of check_snmp_css.pl -h </p>
|
||||
|
||||
<table border="1" cellspacing="5" width="100">
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<pre>
|
||||
SNMP Cisco CSS monitor for Nagios version 1.0
|
||||
(c)2004-2006 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_css.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])
|
||||
-n <name> [-d directory] [-w <num>,<resp>,<conn> -c <num>,<resp>,<conn>] [-p <port>] [-f] [-t <timeout>] [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-n, --name=<name>
|
||||
regexp to select service
|
||||
-w, --warning=<num>,<resp>,<conn>
|
||||
Optional. Warning level for
|
||||
- minimum number of active & alive service
|
||||
- average response time
|
||||
- number of connexions
|
||||
For no warnings, put -1 (ex : -w5,-1,3).
|
||||
When using negative numbers, dont put space after "-w"
|
||||
-d, --dir=<directory to put file>
|
||||
Directory where the temp file with index, created by check_snmp_css_main.pl, can be found
|
||||
If no directory is set, /tmp will be used
|
||||
-c, --critical=<num>,resp>,<conn>
|
||||
Optional. Critical levels (-1 for no critical levels)
|
||||
See warning levels.
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-P, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-f, --perfparse, --perfdata
|
||||
Performance data output
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
</pre>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<p class="NewsItemDate">Output of check_snmp_css_main.pl -h </p>
|
||||
<table border="1" cellspacing="5" width="100">
|
||||
<tr>
|
||||
<td>
|
||||
<pre>
|
||||
SNMP Cisco CSS monitor MAIN script for Nagios version 1.0
|
||||
GPL Licence, (c)2004-2006 Patrick Proy
|
||||
|
||||
Usage: ./check_snmp_css_main.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])
|
||||
[-d directory] [-p <port>] [-t <timeout>] [-V]
|
||||
-v, --verbose
|
||||
print extra debugging information
|
||||
-h, --help
|
||||
print this help message
|
||||
-H, --hostname=HOST
|
||||
name or IP address of host to check
|
||||
-d, --dir=<directory to put file>
|
||||
Directory where temp file with index is written
|
||||
-C, --community=COMMUNITY NAME
|
||||
community name for the host's SNMP agent (implies v1 protocol)
|
||||
-2, --v2c
|
||||
Use snmp v2c
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
Login and auth password for snmpv3 authentication
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
-X, --privpass=PASSWD
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
-P, --port=PORT
|
||||
SNMP port (Default 161)
|
||||
-t, --timeout=INTEGER
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
-V, --version
|
||||
prints version number
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
<A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
|
||||
trademarks of Ethan Galstad.</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
|
||||
</HTML>
|
||||
|
||||
|
||||
|
|
@ -1,370 +0,0 @@
|
|||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Nagios plugins</TITLE>
|
||||
|
||||
<META NAME="Keywords" CONTENT="nagios,plugins,perl,snmp,proy">
|
||||
|
||||
<STYLE type="text/css">
|
||||
|
||||
<!--
|
||||
|
||||
.Default { font-family: verdana,arial,serif; font-size: 10pt; }
|
||||
|
||||
.ProgramTitle { font-family: verdana,arial,serif; font-size: 18pt; font-weight: bold;}
|
||||
|
||||
.Copyright { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.Email { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.NewsItem { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.NewsItemOdd { font-family: verdana,arial,serif; font-size: 8pt; background-color: #DBDBDB;}
|
||||
|
||||
.NewsItemEven { font-family: verdana,arial,serif; font-size: 8pt; background-color: #C4C2C2;}
|
||||
|
||||
.NewsItemUrgent { font-family: verdana,arial,serif; font-size: 8pt; background-color: #ccff99;}
|
||||
|
||||
.NewsItemDate { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
|
||||
|
||||
.SectionTitle { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; text-decoration: underline;}
|
||||
|
||||
.SectionBody { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.ModificationDate { font-family: verdana,arial,serif; font-size: 7pt; }
|
||||
|
||||
.Disclaimer { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
A.SideNavBarItem { font-family: verdana,arial,serif; background-color : black; color: #e7e7e7; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem { font-family: verdana,arial,serif; background-color : black; color: #ffcc66; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
-->
|
||||
|
||||
</STYLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<body background="img/sideback.jpg" bgcolor="#FFFFFF" text="black" class="Default">
|
||||
|
||||
<!-- background="img/sideback.jpg" -->
|
||||
|
||||
<table border="0">
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<!-- Begin Side Bar -->
|
||||
|
||||
<table border="0" width="125" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><a href="http://nagios.manubulon.com/" class="SideNavBarItem" >Home</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><BR>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<!-- End Side Bar -->
|
||||
|
||||
</td>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<table border="0" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="ProgramTitle"> Snmp env check</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="NewsItemDate">Script : check_snmp_env.pl</p>
|
||||
|
||||
<p class="SectionTitle"> Last update : April 19 2007</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="top">
|
||||
|
||||
<p class="SectionTitle">Description : </p>
|
||||
|
||||
<p class="SectionBody">Checks by snmp v1, v2c or v3 environemental
|
||||
parameters such as fan, power supply, temperature</p>
|
||||
<p class="SectionBody"><span class="SectionTitle">SNMP Login</span><br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody">See <a href="index_info.html">snmp info page</a></p>
|
||||
|
||||
<p class="SectionTitle">Requirements :</p>
|
||||
|
||||
<p class="SectionBody"> - Perl in /usr/bin/perl - or just run 'perl
|
||||
script' <br>
|
||||
- Net::SNMP<br>
|
||||
- file 'utils.pm' in plugin diretory (/usr/local/icinga/libexec)<br>
|
||||
</p>
|
||||
<p class="SectionTitle">Checks </p>
|
||||
<p class="SectionBody">The script will make the following checks depending
|
||||
on host type.<br>
|
||||
Either the threshold is directly set by the hardware manufacturer,
|
||||
or you must set them with an option.</p>
|
||||
<p class="SectionBody">This table shows what the script CAN check,
|
||||
depending on hardware version the sensors might not be there.<br>
|
||||
The script will return "UNKNOWN" if no sensors can be
|
||||
found. </p>
|
||||
<p class="SectionBody">If no option is specified in this table, it
|
||||
means the script uses the threshold of the snmp table.</p>
|
||||
<table width="100%" border="1">
|
||||
<tr>
|
||||
<td class="SectionTitle">Host type</td>
|
||||
<td class="SectionTitle">Option</td>
|
||||
<td class="SectionTitle">Power supply</td>
|
||||
<td class="SectionTitle">Fan</td>
|
||||
<td class="SectionTitle">Voltage</td>
|
||||
<td class="SectionTitle">Temperature</td>
|
||||
<td class="SectionTitle">Disks</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">Cisco</td>
|
||||
<td class="SectionBody">cisco</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">No (working on it)</td>
|
||||
<td class="SectionBody">No (working on it)</td>
|
||||
<td class="SectionBody">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">Nokia Ipso</td>
|
||||
<td class="SectionBody">nokia</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">No.</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">Bluecoat</td>
|
||||
<td class="SectionBody">bc</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">IronPort</td>
|
||||
<td class="SectionBody">iron</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">Yes, option '-F' in RPM</td>
|
||||
<td class="SectionBody">No</td>
|
||||
<td class="SectionBody">Yes, option '-c' in Celcius</td>
|
||||
<td class="SectionBody">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">Foundry</td>
|
||||
<td class="SectionBody">Foundry</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">No (bug in snmp agent)</td>
|
||||
<td class="SectionBody">No</td>
|
||||
<td class="SectionBody">Yes</td>
|
||||
<td class="SectionBody">No</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="SectionBody">Note : Bluecoat provides an "other"
|
||||
sensor which is tested also. But I never saw a Bluecoat reporting
|
||||
it.</p>
|
||||
<p class="SectionBody"> </p>
|
||||
|
||||
<p class="SectionBody"><a href="check_snmp_env.pl" class="SectionTitle">Dowload
|
||||
lastest version : 1.2</a></p>
|
||||
|
||||
<p class="SectionBody"><a href="index_commands.html" class="SectionTitle">Configurations
|
||||
|
||||
examples</a></p>
|
||||
|
||||
<p class="NewsItemDate"><span class="SectionTitle">Changelog</span>
|
||||
: On CVS repository on sourceforge : <a href="http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/">http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/</a>.</p>
|
||||
|
||||
<p class="SectionTitle">Examples :</p>
|
||||
|
||||
<p class="SectionBody"><br>
|
||||
|
||||
All examples below are considering the script is local directory.
|
||||
|
||||
Host to be checked is 127.0.0.1 with snmp community "public".</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="154">
|
||||
<p>Get help
|
||||
</td>
|
||||
<td class="SectionBody" width="420">
|
||||
<p>./check_snmp_env.pl <b>-h</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="154">Verbose output</td>
|
||||
<td class="SectionBody" width="420">./check_snmp_env.pl -H <IP>
|
||||
-C <com> <b>-v</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="154">snmpv3 login</td>
|
||||
<td class="SectionBody" width="420">./check_snmp_env.pl -H 127.0.0.1
|
||||
-l login -x passwd<b></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="154">
|
||||
<p>Check Cisco for all sensors
|
||||
</td>
|
||||
<td class="SectionBody" width="420">
|
||||
<p class="SectionBody">./check_snmp_env.pl -H 127.0.0.1 -C public
|
||||
<b>-T cisco</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="154">Check Nokia
|
||||
for all sensors</td>
|
||||
<td class="SectionBody" width="420">./check_snmp_env.pl -H 127.0.0.1
|
||||
-C public <b>-T nokia</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="154">checks ironport
|
||||
fans RPM > 1500 and temp < 70 deg celcius</td>
|
||||
<td class="SectionBody" width="420">./check_snmp_env.pl -H 127.0.0.1
|
||||
-C public <b>-T iron -F 1500 -c 70</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p class="NewsItemDate">Output of check_snmp_env.pl -h </p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="SectionBody" valign = top>
|
||||
<p class="SectionBody"> <br>
|
||||
SNMP environmental Monitor for Nagios version 1.2<br>
|
||||
GPL Licence, (c)2006-2007 Patrick Proy
|
||||
<p>Usage: ./check_snmp_env.pl [-v] -H <host> -C <snmp_community>
|
||||
[-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])
|
||||
[-p <port>] -T (cisco|nokia|bc|iron|foundry) [-F <rpm>]
|
||||
[-c <celcius>] [-f] [-t <timeout>] [-V]<br>
|
||||
-v, --verbose<br>
|
||||
print extra debugging information <br>
|
||||
-h, --help<br>
|
||||
print this help message<br>
|
||||
-H, --hostname=HOST<br>
|
||||
name or IP address of host to check<br>
|
||||
-C, --community=COMMUNITY NAME<br>
|
||||
community name for the host's SNMP agent (implies v1 protocol)<br>
|
||||
-2, --v2c<br>
|
||||
Use snmp v2c<br>
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD<br>
|
||||
Login and auth password for snmpv3 authentication <br>
|
||||
If no priv password exists, implies AuthNoPriv <br>
|
||||
-X, --privpass=PASSWD<br>
|
||||
Priv password for snmpv3 (AuthPriv protocol)<br>
|
||||
-L, --protocols=<authproto>,<privproto><br>
|
||||
<authproto> : Authentication protocol (md5|sha : default
|
||||
md5)<br>
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
<br>
|
||||
-P, --port=PORT<br>
|
||||
SNMP port (Default 161)<br>
|
||||
-T, --type=cisco|nokia|bc|iron|foundry<br>
|
||||
Environemental check : <br>
|
||||
cisco : voltage,temp,fan,power supply status<br>
|
||||
will try to check everything present<br>
|
||||
nokia : fan and power supply<br>
|
||||
bc : fans, power supply, voltage, disks<br>
|
||||
iron : fans, power supply, temp<br>
|
||||
foundry : power supply, temp<br>
|
||||
-F, --fan=<rpm><br>
|
||||
Minimum fan rpm value<br>
|
||||
-c, --celcius=<celcius><br>
|
||||
Maximum temp in degree celcius<br>
|
||||
-f, --perfparse, --perfdata<br>
|
||||
Performance data output<br>
|
||||
-t, --timeout=INTEGER<br>
|
||||
timeout for SNMP in seconds (Default: 5)<br>
|
||||
-V, --version<br>
|
||||
prints version number<br>
|
||||
</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
<A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
|
||||
trademarks of Ethan Galstad.</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
|
||||
</HTML>
|
||||
|
||||
|
||||
|
|
@ -1,673 +0,0 @@
|
|||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Nagios plugins</TITLE>
|
||||
|
||||
<META NAME="Keywords" CONTENT="nagios,plugins,perl,snmp,proy">
|
||||
|
||||
<STYLE type="text/css">
|
||||
|
||||
<!--
|
||||
|
||||
.Default { font-family: verdana,arial,serif; font-size: 10pt; }
|
||||
|
||||
.ProgramTitle { font-family: verdana,arial,serif; font-size: 18pt; font-weight: bold;}
|
||||
|
||||
.Copyright { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.Email { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.NewsItem { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.NewsItemOdd { font-family: verdana,arial,serif; font-size: 8pt; background-color: #DBDBDB;}
|
||||
|
||||
.NewsItemEven { font-family: verdana,arial,serif; font-size: 8pt; background-color: #C4C2C2;}
|
||||
|
||||
.NewsItemUrgent { font-family: verdana,arial,serif; font-size: 8pt; background-color: #ccff99;}
|
||||
|
||||
.NewsItemDate { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
|
||||
|
||||
.SectionTitle { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; text-decoration: underline;}
|
||||
|
||||
.SectionBody { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.ModificationDate { font-family: verdana,arial,serif; font-size: 7pt; }
|
||||
|
||||
.Disclaimer { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
A.SideNavBarItem { font-family: verdana,arial,serif; background-color : black; color: #e7e7e7; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem { font-family: verdana,arial,serif; background-color : black; color: #ffcc66; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
-->
|
||||
|
||||
</STYLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<body background="img/sideback.jpg" bgcolor="#FFFFFF" text="black" class="Default">
|
||||
|
||||
<!-- background="img/sideback.jpg" -->
|
||||
|
||||
<table border="0" height="1477">
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<!-- Begin Side Bar -->
|
||||
|
||||
<table border="0" width="125" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><a href="http://nagios.manubulon.com/" class="SideNavBarItem" >Home</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><BR>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<!-- End Side Bar -->
|
||||
|
||||
</td>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<table border="0" valign=top height="1452">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="ProgramTitle"> Snmp interface check</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="NewsItemDate">Script : check_snmp_int.pl</p>
|
||||
|
||||
<p class="SectionTitle"> Last update : May 24 2007</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="top">
|
||||
|
||||
<p class="SectionTitle">Description :</p>
|
||||
|
||||
<p class="SectionBody">Checks by snmp (v1, v2c or v3) host interface
|
||||
|
||||
state and usage. <br>
|
||||
|
||||
<br>
|
||||
|
||||
Interfaces can be selected by regexp ( 'eth' will check eth0, eth1,
|
||||
|
||||
eth2, ...).<br>
|
||||
|
||||
If multiple interfaces are selected, all must be up to get an OK
|
||||
|
||||
result<br>
|
||||
|
||||
<b><br>
|
||||
|
||||
</b>Vérifie par snmp v1, v2c ou v3 l'état des interfaces
|
||||
|
||||
d'un hôte, leur utilisation (bande passante, erreurs, pertes)
|
||||
|
||||
et sortir des informations de performances.<br>
|
||||
|
||||
Ce script permet d'utiliser des expressions régulières
|
||||
|
||||
pour sélectionner les interfaces : ex 'eth' va vérifier
|
||||
|
||||
eth0, eth1, ...<br>
|
||||
|
||||
Il permet également de lister toutes les interfaces disponibles
|
||||
|
||||
sur la machine cible (option -v) pour voir leur nom en SNMP.<br>
|
||||
|
||||
<i>Pour les francophones, je ferais un manuel en Français
|
||||
|
||||
quand j'aurais le temps... (et toute aide est bienvenue).</i><b><br>
|
||||
|
||||
</b><br>
|
||||
|
||||
<span class="SectionTitle">Standard checks</span><br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody">The script will check interface operationnal
|
||||
|
||||
status using the MIB-II table. The interface is (are) selected by
|
||||
|
||||
the <b>-n </b>option.<br>
|
||||
|
||||
This option will be treated as a regular expression (eth will match
|
||||
|
||||
eth0, eth1, eth2...). You can disable this with the <b>-r </b>option
|
||||
|
||||
: the interface will be selected if it's description exactly matches
|
||||
|
||||
the name given by -n</p>
|
||||
|
||||
<p class="SectionBody">The interfaces are selected by their description
|
||||
|
||||
in the MIB-II table.<br>
|
||||
<b>To see how interface looks like by snmp, you can list all of
|
||||
them with the '-v' switch.</b><br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody">The script will return OK if ALL interfaces
|
||||
|
||||
selected are UP, or CRITICAL if at least one interface is down.<br>
|
||||
|
||||
<br>
|
||||
|
||||
You can make the script return a OK value when all interfaces are
|
||||
|
||||
down (and CRITICAL when at least one is up) with the <b>-i </b>option.</p>
|
||||
|
||||
<p class="SectionBody">You can make the same tests on administrative
|
||||
|
||||
status instead with the <b>-a </b>option.</p>
|
||||
<p class="SectionBody">If you have ISDN interface, and want that DORMANT state returns ok, put <strong>-D</strong>.</p>
|
||||
<p class="SectionBody">To make output shorter, specially when you
|
||||
|
||||
have multiple interface, you can put the <b>-s</b> option. <br>
|
||||
|
||||
It will get only the first <n> caracters of the interface
|
||||
|
||||
descrition. If the number is negative then get the last <n>
|
||||
|
||||
caracters.</p>
|
||||
|
||||
<p class="SectionBody">Ex : EL20005 3Com Gigabit NIC (3C2000 Family)<br>
|
||||
|
||||
<b> -s 4 </b> will output : "EL20".<br>
|
||||
|
||||
<b>-s -4</b> will output : "ily)".</p>
|
||||
|
||||
<p class="SectionTitle">Performance output </p>
|
||||
|
||||
<p class="SectionBody"><b>-f </b>option : activate performance output
|
||||
(default the In/out octet as a counter).<br>
|
||||
<b>-e </b>option : in/out errors and discarded packets. -f must
|
||||
also be set.<br>
|
||||
-<b>S</b> option : Include speed in performance output in bits/s
|
||||
as '<interface_name>_speed_bps'<br>
|
||||
<b>-y </b>option : output performance data in % of interface speed<b><br>
|
||||
-Y</b> option : output performance data in bits/s or Bytes/s (depending
|
||||
on -B)</p>
|
||||
<p class="SectionBody"><b>Note</b> : -y and -Y options need the usage
|
||||
check to ba active (-k)</p>
|
||||
<p class="SectionBody"><b>Warning</b> : the counters needed by -e
|
||||
|
||||
are not always available on all machines (ex Nokia IP)<br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"><span class="SectionTitle">Usage check (-k)
|
||||
</span><br>
|
||||
<br>
|
||||
<br>
|
||||
A temporary file will be created in "/tmp" by default
|
||||
: this can be changed at the beginning of the script. <br>
|
||||
The file name will be : tmp_Icinga_int.<host IP>.<Interface
|
||||
name>. One file will be created by interface.<br>
|
||||
<br>
|
||||
The status UNKNOWN is returned when the script doesn't have enough
|
||||
information (see -d option).<br>
|
||||
<br>
|
||||
You will have to tell the warning and critical levels, separated
|
||||
with "," and you can use decimal (ex : 10.3).<br>
|
||||
For standard checks (no "-q" option) : <br>
|
||||
-w <i><In warn></i>,<i><Out warn></i> -c <i><In warn></i>,<i><Out
|
||||
warn><br>
|
||||
</i>In warn : warning level for incomming traffic<br>
|
||||
Out warn : warning level for outgoing traffic<br>
|
||||
In crit : critical level for incomming traffic<br>
|
||||
Out crit : critical level for outgoing traffic<br>
|
||||
</p>
|
||||
<p class="SectionBody">The unit for the check depends on the -B, -M
|
||||
and -G option :</p>
|
||||
<table border="0" cellpadding="2" cellspacing="3" width="276">
|
||||
<tr>
|
||||
<td class="SectionBody" width="111"> </td>
|
||||
<td class="SectionBody" width="66"><b> -B set</b></td>
|
||||
<td class="SectionBody" width="75"><b>-B not set</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody" width="111"><b>-M & -G not set</b></td>
|
||||
<td class="SectionBody" width="66">
|
||||
<div align="center">Kbps</div>
|
||||
</td>
|
||||
<td class="SectionBody" width="75">
|
||||
<div align="center">KBps</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody" width="111"><b>-M set</b></td>
|
||||
<td class="SectionBody" width="66">
|
||||
<div align="center">Mbps</div>
|
||||
</td>
|
||||
<td class="SectionBody" width="75">
|
||||
<div align="center">MBps</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody" width="111"><b>-G set</b></td>
|
||||
<td class="SectionBody" width="66">
|
||||
<div align="center">Gbps</div>
|
||||
</td>
|
||||
<td class="SectionBody" width="75">
|
||||
<div align="center">GBps</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="SectionBody">It is possible to put warning and critical
|
||||
|
||||
levels with -b option.<br>
|
||||
|
||||
<b>0 means no warning or critical level checks</b></p>
|
||||
|
||||
<p class="SectionBody">When the extended checks are activated (-q
|
||||
option), the warning levels are <br>
|
||||
-w <i><In bytes></i>,<i><Out bytes></i>,<i><In error></i>,<i><Out
|
||||
error>,<i><In disc></i>,<i><Out disc></i></i> -c
|
||||
<i><In warn></i>,<i><Out warn></i>, .....<br>
|
||||
In error : warn/crit level in inboud <b>error/minute<br>
|
||||
</b>Out error : warn/crit level in outbound error/minute<b> </b><br>
|
||||
In disc : warn/crit level in inboud <b>discarded packets/minute<br>
|
||||
</b>Out disc : warn/crit level in outbound discarded packets/minute<b>
|
||||
</b><br>
|
||||
</p>
|
||||
<p class="SectionBody"><b>-k</b> : activates the standard usage feature<br>
|
||||
<b>-q</b> : activates the extended usage<br>
|
||||
<b>-d</b> : delta in seconds (default is 300s)<br>
|
||||
<b>-w</b> : warning levels<br>
|
||||
<b>-c</b> : critical levels<br>
|
||||
</p>
|
||||
<p class="SectionBody"><b>-d</b>: delta time<br>
|
||||
|
||||
You can put the delta time as an option : the "delta"
|
||||
|
||||
is the prefered time between two values that the script will use
|
||||
|
||||
to calculate the average Kbytes/s or error/min. The delta time should
|
||||
|
||||
(not must) be bigger than the check interval.<br>
|
||||
|
||||
Here is an example : Check interval of 2 minutes and delta of 4min</p>
|
||||
|
||||
<p class="SectionBody">T0 : value 1 : can't calculate usage<br>
|
||||
|
||||
T0+2 : value 2 : can't calculate usage<br>
|
||||
|
||||
T0+4 : value 3 : usage=(value3-value1)/((T0+4)-T0) <br>
|
||||
|
||||
T0+6 : value 4 : usage=(value4-value2)/((T0+6)-T0+2)<br>
|
||||
|
||||
(Yes I know TO+4-T0=4, it's just to explain..)<br>
|
||||
|
||||
.........</p>
|
||||
|
||||
<p class="SectionBody">The script will allow 10% less of the delta
|
||||
|
||||
and 300% more than delta as a correct interval. <br>
|
||||
|
||||
For example, with a delta of 5 minutes, the acceptable interval
|
||||
|
||||
will be between 4'30" and 15 minutes.</p>
|
||||
|
||||
<p class="SectionBody"> <b>Msg size option </b>(<i>-o</i><b><i> </i></b>option)</p>
|
||||
<p class="SectionBody">In case you get a "ERROR: running table
|
||||
: Message size exceeded maxMsgSize" error, you may need to
|
||||
adjust the maxMsgSize, i.e. the maximum size of snmp message with
|
||||
the -o option. Try a value with the -o AND the -v option : the script
|
||||
will output the actual value so you can add some octets to it with
|
||||
the -o option.</p>
|
||||
<p class="SectionBody"><b>--label option</b></p>
|
||||
<p class="SectionBody">This option just put label before the speed
|
||||
output :<br>
|
||||
Without : eth1:UP (10.3Kbps/4.4Kbps), eth0:UP (10.9Kbps/16.4Kbps):2
|
||||
UP: OK<br>
|
||||
With : eth1:UP (in=14.4Kbps/out=6.2Kbps), eth0:UP (in=15.3Kbps/out=22.9Kbps):2
|
||||
UP: OK<br>
|
||||
</p>
|
||||
<p class="SectionBody"><span class="SectionTitle">SNMP Login</span><br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody">See <a href="index_info.html">snmp info page</a></p>
|
||||
|
||||
<p class="SectionTitle">Requirements :</p>
|
||||
|
||||
<p class="SectionBody"> - Perl in /usr/bin/perl - or just run 'perl
|
||||
|
||||
script' <br>
|
||||
|
||||
- Net::SNMP<br>
|
||||
|
||||
- file 'utils.pm' in plugin diretory (/usr/local/icinga/libexec)<br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"><a href="check_snmp_int.pl" class="SectionTitle">Dowload
|
||||
latest version : 1.4.8</a></p>
|
||||
|
||||
<p class="SectionBody"><a href="index_commands.html" class="SectionTitle">Configuration
|
||||
|
||||
examples</a></p>
|
||||
|
||||
<p class="SectionTitle">Examples :</p>
|
||||
|
||||
<p class="SectionBody"><br>
|
||||
|
||||
All examples below are considering the script is local directory.
|
||||
|
||||
Host to be checked is 127.0.0.1 with snmp community "public".</p>
|
||||
|
||||
<p class="SectionBody">If multiple interfaces are selected, all must
|
||||
|
||||
be up to get an OK result</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="198">
|
||||
|
||||
<p>Get help
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="496">
|
||||
|
||||
<p>./check_snmp_int.pl <b>-h</b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="198">List all interfaces</td>
|
||||
|
||||
<td class="SectionBody" width="496">./check_snmp_int.pl -H 127.0.0.1
|
||||
|
||||
-C public -n zzzz <b>-v</b></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="198">snmpv3 login</td>
|
||||
|
||||
<td class="SectionBody" width="496">./check_snmp_int.pl -H 127.0.0.1
|
||||
|
||||
-l login -w passwd<b></b></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="198">
|
||||
|
||||
<p>Check eth0 interface is up
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="496">
|
||||
|
||||
<p>./check_snmp_int.pl -H 127.0.0.1 -C public <b>-n eth0 -r</b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="198">
|
||||
|
||||
<p>Check that all eth interface are up
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="496">
|
||||
|
||||
<p>./check_snmp_int.pl -H 127.0.0.1 -C public <b>-n eth </b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="198">
|
||||
|
||||
<p>Check that all ppp interface are down
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="496">
|
||||
|
||||
<p>./check_snmp_int.pl -H 127.0.0.1 -C public <b>-n ppp -i</b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="198">
|
||||
|
||||
<p>Check that all eth interface are administratively up
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="496">
|
||||
|
||||
<p>./check_snmp_int.pl -H 127.0.0.1 -C public <b>-n eth -a</b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="198">
|
||||
|
||||
<p>Check that FastEternet0/11 to 0/14 are up (Cisco)
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="496">
|
||||
|
||||
<p>./check_snmp_int.pl -H 127.0.0.1 -C public <b>-n "Fast.*0.1[1234]"</b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="198">Check the eth0
|
||||
|
||||
usage <br>
|
||||
|
||||
Note : no critical inbound (0)</td>
|
||||
|
||||
<td class="SectionBody" width="496">./check_snmp_int.pl -H 127.0.0.1
|
||||
|
||||
-C public -n eth0 <b>-k -w 200,400 -c 0,600</b></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p class="NewsItemDate"><span class="SectionTitle">Changelog</span>
|
||||
: On CVS repository on sourceforge : <a href="http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/">http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/</a>.</p>
|
||||
|
||||
<p class="NewsItemDate">Output of check_snmp_int.pl -h</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="SectionBody" valign = top>
|
||||
<p>SNMP Network Interface Monitor for Nagios version 1.4.8<br>
|
||||
GPL licence, (c)2004-2007 Patrick Proy</p>
|
||||
<p>Usage: ./check_snmp_int.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>) [-p <port>] -n <name in desc_oid> [-i -a -D] [-r] [-f[eSyY]] [-k[qBMGu] -g -w<warn levels> -c<crit levels> -d<delta>] [-o <octet_length>] [-t <timeout>] [-s] --label [-V]<br>
|
||||
-v, --verbose<br>
|
||||
print extra debugging information (including interface list on the system)<br>
|
||||
-h, --help<br>
|
||||
print this help message<br>
|
||||
-H, --hostname=HOST<br>
|
||||
name or IP address of host to check<br>
|
||||
-C, --community=COMMUNITY NAME<br>
|
||||
community name for the host's SNMP agent (implies v1 protocol)<br>
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD, -2, --v2c<br>
|
||||
Login and auth password for snmpv3 authentication <br>
|
||||
If no priv password exists, implies AuthNoPriv <br>
|
||||
-2 : use snmp v2c<br>
|
||||
-X, --privpass=PASSWD<br>
|
||||
Priv password for snmpv3 (AuthPriv protocol)<br>
|
||||
-L, --protocols=<authproto>,<privproto><br>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)<br>
|
||||
<privproto> : Priv protocole (des|aes : default des) <br>
|
||||
-P, --port=PORT<br>
|
||||
SNMP port (Default 161)<br>
|
||||
-n, --name=NAME<br>
|
||||
Name in description OID (eth0, ppp0 ...).<br>
|
||||
This is treated as a regexp : -n eth will match eth0,eth1,...<br>
|
||||
Test it before, because there are known bugs (ex : trailling /)<br>
|
||||
-r, --noregexp<br>
|
||||
Do not use regexp to match NAME in description OID<br>
|
||||
-i, --inverse<br>
|
||||
Make critical when up<br>
|
||||
-a, --admin<br>
|
||||
Use administrative status instead of operational<br>
|
||||
-D, --dormant<br>
|
||||
Dormant state is an OK state<br>
|
||||
-o, --octetlength=INTEGER<br>
|
||||
max-size of the SNMP message, usefull in case of Too Long responses.<br>
|
||||
Be carefull with network filters. Range 484 - 65535, default are<br>
|
||||
usually 1472,1452,1460 or 1440. <br>
|
||||
-f, --perfparse, --perfdata<br>
|
||||
Performance data output (no output when interface is down).<br>
|
||||
-e, --error<br>
|
||||
Add error & discard to Perfparse output<br>
|
||||
-S, --intspeed<br>
|
||||
Include speed in performance output in bits/s<br>
|
||||
-y, --perfprct ; -Y, --perfspeed<br>
|
||||
-y : output performance data in % of max speed <br>
|
||||
-Y : output performance data in bits/s or Bytes/s (depending on -B) <br>
|
||||
-k, --perfcheck ; -q, --extperfcheck <br>
|
||||
-k check the input/ouput bandwidth of the interface<br>
|
||||
-q also check the error and discard input/output<br>
|
||||
--label<br>
|
||||
Add label before speed in output : in=, out=, errors-out=, etc...<br>
|
||||
-g, --64bits<br>
|
||||
Use 64 bits counters instead of the standard counters when checking <br>
|
||||
bandwidth & performance data for interface >= 1Gbps.<br>
|
||||
You must use snmp v2c or v3 to get 64 bits counters.<br>
|
||||
-d, --delta=seconds<br>
|
||||
make an average of <delta> seconds (default 300=5min)<br>
|
||||
-B, --kbits<br>
|
||||
Make the warning and critical levels in K|M|G Bits/s instead of K|M|G Bytes/s<br>
|
||||
-G, --giga ; -M, --mega ; -u, --prct<br>
|
||||
-G : Make the warning and critical levels in Gbps (with -B) or GBps<br>
|
||||
-M : Make the warning and critical levels in Mbps (with -B) or MBps<br>
|
||||
-u : Make the warning and critical levels in % of reported interface speed.<br>
|
||||
-w, --warning=input,output[,error in,error out,discard in,discard out]<br>
|
||||
warning level for input / output bandwidth (0 for no warning)<br>
|
||||
unit depends on B,M,G,u options<br>
|
||||
warning for error & discard input / output in error/min (need -q)<br>
|
||||
-c, --critical=input,output[,error in,error out,discard in,discard out]<br>
|
||||
critical level for input / output bandwidth (0 for no critical)<br>
|
||||
unit depends on B,M,G,u options<br>
|
||||
critical for error & discard input / output in error/min (need -q)<br>
|
||||
-s, --short=int<br>
|
||||
Make the output shorter : only the first <n> chars of the interface(s)<br>
|
||||
If the number is negative, then get the <n> LAST caracters.<br>
|
||||
-t, --timeout=INTEGER<br>
|
||||
timeout for SNMP in seconds (Default: 5) <br>
|
||||
-V, --version<br>
|
||||
prints version number<br>
|
||||
Note : when multiple interface are selected with regexp, <br>
|
||||
all be must be up (or down with -i) to get an OK result.</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
<A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
|
||||
trademarks of Ethan Galstad.</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p> </p>
|
||||
|
||||
</BODY>
|
||||
|
||||
</HTML>
|
||||
|
||||
|
||||
|
|
@ -1,409 +0,0 @@
|
|||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Nagios plugins</TITLE>
|
||||
|
||||
<META NAME="Keywords" CONTENT="nagios,plugins,perl,snmp,proy">
|
||||
|
||||
<STYLE type="text/css">
|
||||
|
||||
<!--
|
||||
|
||||
.Default { font-family: verdana,arial,serif; font-size: 10pt; }
|
||||
|
||||
.ProgramTitle { font-family: verdana,arial,serif; font-size: 18pt; font-weight: bold;}
|
||||
|
||||
.Copyright { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.Email { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.NewsItem { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.NewsItemOdd { font-family: verdana,arial,serif; font-size: 8pt; background-color: #DBDBDB;}
|
||||
|
||||
.NewsItemEven { font-family: verdana,arial,serif; font-size: 8pt; background-color: #C4C2C2;}
|
||||
|
||||
.NewsItemUrgent { font-family: verdana,arial,serif; font-size: 8pt; background-color: #ccff99;}
|
||||
|
||||
.NewsItemDate { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
|
||||
|
||||
.SectionTitle { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; text-decoration: underline;}
|
||||
|
||||
.SectionBody { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.ModificationDate { font-family: verdana,arial,serif; font-size: 7pt; }
|
||||
|
||||
.Disclaimer { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
A.SideNavBarItem { font-family: verdana,arial,serif; background-color : black; color: #e7e7e7; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem { font-family: verdana,arial,serif; background-color : black; color: #ffcc66; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
-->
|
||||
|
||||
</STYLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<body background="img/sideback.jpg" bgcolor="#FFFFFF" text="black" class="Default">
|
||||
|
||||
<table border="0">
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<!-- Begin Side Bar -->
|
||||
|
||||
<table border="0" width="125" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><a href="http://nagios.manubulon.com/" class="SideNavBarItem" >Home</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><BR>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<!-- End Side Bar -->
|
||||
|
||||
</td>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<table border="0" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="ProgramTitle"> Snmp load check</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="NewsItemDate">Script : check_snmp_load.pl</p>
|
||||
|
||||
<p class="SectionTitle"> Last update : Sept 5 2006</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="top">
|
||||
|
||||
<p class="SectionTitle">Description : </p>
|
||||
|
||||
<p class="SectionBody">Checks by snmp v1, v2c or v3 cpu or average
|
||||
|
||||
load. <br>
|
||||
|
||||
Works on Windows, Linux/Unix, AS400, Cisco, Cisco catalyst, HP Procurve, LinkProof,
|
||||
|
||||
Blucoat, Nokia, Fortinet, Netscreen.</p>
|
||||
|
||||
<p class="SectionBody">Check types are selected by the -T option :
|
||||
|
||||
</p>
|
||||
|
||||
<table border="1">
|
||||
<tr>
|
||||
<td class="SectionTitle">
|
||||
<div align="center">-T value</div>
|
||||
</td>
|
||||
<td class="SectionTitle">
|
||||
<div align="center">System </div>
|
||||
</td>
|
||||
<td class="SectionTitle">
|
||||
<div align="center">-w & -c values</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>netsl</b></td>
|
||||
<td class="SectionBody">Linux : load provided by Net SNMP</td>
|
||||
<td class="SectionBody">3 values : load average on 1 min, 5 min,
|
||||
15 min (absolute)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>netsc</b></td>
|
||||
<td class="SectionBody">Linux : CPU usage given by net-snmp</td>
|
||||
<td class="SectionBody">1 value in %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>as400</b></td>
|
||||
<td class="SectionBody">as400 CPU usage</td>
|
||||
<td class="SectionBody">1 value in %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>cisco</b></td>
|
||||
<td class="SectionBody">cisco CPU usage</td>
|
||||
<td class="SectionBody">3 values : CPU average on 5sec, 1 min
|
||||
& 5 min (%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>cata</b></td>
|
||||
<td class="SectionBody">cisco catalyst CPU usage</td>
|
||||
<td class="SectionBody">3 values : CPU average on 5sec, 1 min
|
||||
& 5 min (%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>nsc</b></td>
|
||||
<td class="SectionBody">Netscreen CPU usage</td>
|
||||
<td class="SectionBody">3 values : CPU average on 5sec, 1 min
|
||||
& 5 min (%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>fg</b></td>
|
||||
<td class="SectionBody">Fortigate CPU usage</td>
|
||||
<td class="SectionBody">1 value in %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>bc</b></td>
|
||||
<td class="SectionBody">bluecoat CPU usage</td>
|
||||
<td class="SectionBody">1 value in %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>nokia</b></td>
|
||||
<td class="SectionBody">nokia CPU usage</td>
|
||||
<td class="SectionBody">1 value in %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>hp</b></td>
|
||||
<td class="SectionBody">HP procurve switch CPU usage</td>
|
||||
<td class="SectionBody">1 value in %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>lp</b></td>
|
||||
<td class="SectionBody">Linkproof CPU usage</td>
|
||||
<td class="SectionBody">1 value in %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody"><b>hpux</b></td>
|
||||
<td class="SectionBody">HP-UX load</td>
|
||||
<td class="SectionBody">3 values : load average on 1 min, 5 min,
|
||||
15 min</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p class="SectionBody"> Vérifie par snmp v1,v2c ou v3 la charge
|
||||
|
||||
ou l'ocupation CPU.</p>
|
||||
|
||||
<p class="SectionBody"><span class="SectionTitle">SNMP Login</span><br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody">See <a href="index_info.html">snmp info page</a></p>
|
||||
|
||||
<p class="SectionTitle">Requirements :</p>
|
||||
|
||||
<p class="SectionBody"> - Perl in /usr/bin/perl - or just run 'perl
|
||||
|
||||
script' <br>
|
||||
|
||||
- Net::SNMP<br>
|
||||
|
||||
- file 'utils.pm' in plugin diretory<br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"><a href="check_snmp_load.pl" class="SectionTitle">Dowload
|
||||
lastest version : 1.3.1</a> </p>
|
||||
|
||||
<p class="SectionBody"><a href="index_commands.html" class="SectionTitle">Configurations
|
||||
|
||||
examples</a></p>
|
||||
|
||||
<p class="SectionTitle"><span class="SectionTitle">Changelog</span>
|
||||
: On CVS repository on sourceforge : <a href="http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/">http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/</a>.</p>
|
||||
<p class="SectionTitle">Examples :</p>
|
||||
|
||||
<p class="SectionBody"><br>
|
||||
|
||||
All examples below are considering the script is local directory.
|
||||
|
||||
Host to be checked is 127.0.0.1 with snmp community "public".</p>
|
||||
|
||||
<p class="SectionBody">If multiple interfaces are selected, all must
|
||||
|
||||
be up to get an OK result</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
<p>Get help
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>./check_snmp_load.pl <b>-h</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
<p>Check loads on linux with Net-SNMP : checks the 1, 5 and
|
||||
15 minutes load average.
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>./check_snmp_load.pl -H 127.0.0.1 -C public <b>-w 3,3,2 -c
|
||||
4,4,3 -T netsl</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
<p>Check cpu load (generic) : checks the %used CPU for the last
|
||||
minute
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>./check_snmp_load.pl -H 127.0.0.1 -C public <b>-w 98% -c
|
||||
99%</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
<p>Check cpu load on AS/400
|
||||
</td>
|
||||
<td class="SectionBody">
|
||||
<p>./check_snmp_load.pl -H 127.0.0.1 -C public <b>-w 98% -c
|
||||
99% -T as400</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p class="NewsItemDate">Output of check_snmp_load.pl -h</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="SectionBody" valign = top>
|
||||
SNMP Load & CPU Monitor for Nagios version 1.3<br>
|
||||
(c)2004-2006 Patrick Proy
|
||||
<p>Usage: ./check_snmp_load.pl [-v] -H <host> -C <snmp_community>
|
||||
[-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])
|
||||
[-p <port>] -w <warn level> -c <crit level>
|
||||
-T=[stand|netsl|netsc|as400|cisco|cata|nsc|fg|bc|nokia|hp|lp]
|
||||
[-f] [-t <timeout>] [-V]<br>
|
||||
-v, --verbose<br>
|
||||
print extra debugging information <br>
|
||||
-h, --help<br>
|
||||
print this help message<br>
|
||||
-H, --hostname=HOST<br>
|
||||
name or IP address of host to check<br>
|
||||
-C, --community=COMMUNITY NAME<br>
|
||||
community name for the host's SNMP agent (implies v1 protocol)<br>
|
||||
-2, --v2c<br>
|
||||
Use snmp v2c<br>
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD<br>
|
||||
Login and auth password for snmpv3 authentication <br>
|
||||
If no priv password exists, implies AuthNoPriv <br>
|
||||
-X, --privpass=PASSWD<br>
|
||||
Priv password for snmpv3 (AuthPriv protocol)<br>
|
||||
-L, --protocols=<authproto>,<privproto><br>
|
||||
<authproto> : Authentication protocol (md5|sha : default
|
||||
md5)<br>
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
<br>
|
||||
-P, --port=PORT<br>
|
||||
SNMP port (Default 161)<br>
|
||||
-w, --warn=INTEGER | INT,INT,INT<br>
|
||||
1 value check : warning level for cpu in percent (on one minute)<br>
|
||||
3 value check : comma separated level for load or cpu for
|
||||
1min, 5min, 15min <br>
|
||||
-c, --crit=INTEGER | INT,INT,INT<br>
|
||||
critical level for cpu in percent (on one minute)<br>
|
||||
1 value check : critical level for cpu in percent (on one
|
||||
minute)<br>
|
||||
3 value check : comma separated level for load or cpu for
|
||||
1min, 5min, 15min <br>
|
||||
-T, --type=stand|netsl|netsc|as400|cisco|bc|nokia|hp|lp<br>
|
||||
CPU check : <br>
|
||||
stand : standard MIBII (works with Windows), <br>
|
||||
can handle multiple CPU.<br>
|
||||
netsl : linux load provided by Net SNMP<br>
|
||||
netsc : cpu usage given by net-snmp (100-idle)<br>
|
||||
as400 : as400 CPU usage<br>
|
||||
cisco : Cisco CPU usage<br>
|
||||
cata : Cisco catalyst CPU usage<br>
|
||||
nsc : NetScreen CPU usage<br>
|
||||
fg : Fortigate CPU usage<br>
|
||||
bc : Bluecoat CPU usage<br>
|
||||
nokia : Nokia CPU usage<br>
|
||||
hp : HP procurve switch CPU usage<br>
|
||||
lp : Linkproof CPU usage<br>
|
||||
-f, --perfparse, --perfdata<br>
|
||||
Performance data output<br>
|
||||
-t, --timeout=INTEGER<br>
|
||||
timeout for SNMP in seconds (Default: 5)<br>
|
||||
-V, --version<br>
|
||||
prints version number</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
<A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
|
||||
trademarks of Ethan Galstad.</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p> </p>
|
||||
|
||||
</BODY>
|
||||
|
||||
</HTML>
|
||||
|
||||
|
||||
|
|
@ -1,485 +0,0 @@
|
|||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Nagios plugins</TITLE>
|
||||
|
||||
<META NAME="Keywords" CONTENT="nagios,plugins,perl,snmp,proy">
|
||||
|
||||
<STYLE type="text/css">
|
||||
|
||||
<!--
|
||||
|
||||
.Default { font-family: verdana,arial,serif; font-size: 10pt; }
|
||||
|
||||
.ProgramTitle { font-family: verdana,arial,serif; font-size: 18pt; font-weight: bold;}
|
||||
|
||||
.Copyright { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.Email { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.NewsItem { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.NewsItemOdd { font-family: verdana,arial,serif; font-size: 8pt; background-color: #DBDBDB;}
|
||||
|
||||
.NewsItemEven { font-family: verdana,arial,serif; font-size: 8pt; background-color: #C4C2C2;}
|
||||
|
||||
.NewsItemUrgent { font-family: verdana,arial,serif; font-size: 8pt; background-color: #ccff99;}
|
||||
|
||||
.NewsItemDate { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
|
||||
|
||||
.SectionTitle { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; text-decoration: underline;}
|
||||
|
||||
.SectionBody { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.ModificationDate { font-family: verdana,arial,serif; font-size: 7pt; }
|
||||
|
||||
.Disclaimer { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
A.SideNavBarItem { font-family: verdana,arial,serif; background-color : black; color: #e7e7e7; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem { font-family: verdana,arial,serif; background-color : black; color: #ffcc66; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
-->
|
||||
|
||||
</STYLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<body background="img/sideback.jpg" bgcolor="#FFFFFF" text="black" class="Default">
|
||||
|
||||
<!-- background="img/sideback.jpg" -->
|
||||
|
||||
<table border="0">
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<!-- Begin Side Bar -->
|
||||
|
||||
<table border="0" width="125" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><a href="http://nagios.manubulon.com/" class="SideNavBarItem" >Home</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><BR>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<!-- End Side Bar -->
|
||||
|
||||
</td>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<table border="0" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="ProgramTitle"> Snmp memory check</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="NewsItemDate">Script : check_snmp_mem.pl</p>
|
||||
|
||||
<p class="SectionTitle"> Last update : Sept 4 2006</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="top">
|
||||
|
||||
<p class="SectionTitle">Description : </p>
|
||||
|
||||
<p class="SectionBody">Checks by snmp v1, v2c or v3 :</p>
|
||||
|
||||
<p class="SectionBody">- Memory and swap usage on Linux given by Net-snmp.
|
||||
|
||||
<br>
|
||||
|
||||
It checks memory and swap usage independantly : one warning and
|
||||
|
||||
critical level for each of them.<br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody">- Memory usage on cisco routers or Pix : the
|
||||
|
||||
plugin will add all of the memory pool and then checks the warning
|
||||
|
||||
and critical levels.<br>
|
||||
|
||||
On cisco routeurs, it will add 'IO' and 'Processor' memory<br>
|
||||
|
||||
On Pix, it will check the memory used (one memory pool only on Pix).<br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody">- Memory usage on HP Procurve switch.<br>
|
||||
|
||||
Memory segments will be added then the free memory will be checked.<br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody">Vérification de :<br>
|
||||
|
||||
- l'utilisation mémoire et swap sur Linux/Net-snmp<br>
|
||||
|
||||
- l'utilisation mémoire sur Cisco (routeurs et Pix).<br>
|
||||
|
||||
Pour d'autres SE (Windows, AS400), lire la suite.</p>
|
||||
|
||||
<p class="SectionTitle">Checking memory for other os :</p>
|
||||
|
||||
<p class="SectionBody"><b>AS/400 : </b>use the check_snmp_storage
|
||||
|
||||
command to check the RAM</p>
|
||||
|
||||
<p class="SectionBody">./check_snmp_storage.pl -H <b><IP></b>
|
||||
|
||||
-C <b><community></b> -m RAM -s -w <b><warn%></b> -c
|
||||
|
||||
<b><crit%></b></p>
|
||||
|
||||
<p class="SectionBody"><b>Windows : </b>use the check_snmp_storage
|
||||
|
||||
command to check the virtual memory (RAM+Swap)</p>
|
||||
|
||||
<p class="SectionBody">./check_snmp_storage.pl -H <b><IP></b>
|
||||
|
||||
-C <b><community></b> -m "^Virtual Memory$" -w <b><warn%></b>
|
||||
|
||||
-c <b><crit%></b></p>
|
||||
|
||||
<p class="SectionBody"><span class="SectionTitle">SNMP Login</span><br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody">See <a href="index_info.html">snmp info page</a></p>
|
||||
|
||||
<p class="SectionTitle">Requirements :</p>
|
||||
|
||||
<p class="SectionBody"> - Perl in /usr/bin/perl - or just run 'perl
|
||||
|
||||
script' <br>
|
||||
|
||||
- Net::SNMP<br>
|
||||
|
||||
- file 'utils.pm' in plugin diretory (/usr/local/icinga/libexec)<br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"><a href="check_snmp_mem.pl" class="SectionTitle">Dowload
|
||||
|
||||
lastest version : 1.1</a> </p>
|
||||
|
||||
<p class="SectionBody"><a href="index_commands.html" class="SectionTitle">Configurations
|
||||
|
||||
examples</a></p>
|
||||
|
||||
<p class="NewsItemDate"><span class="SectionTitle">Changelog</span>
|
||||
: On CVS repository on sourceforge : <a href="http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/">http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/</a>.</p>
|
||||
|
||||
<p class="SectionTitle">Examples :</p>
|
||||
|
||||
<p class="SectionBody"><br>
|
||||
|
||||
All examples below are considering the script is local directory.
|
||||
|
||||
Host to be checked is 127.0.0.1 with snmp community "public".</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="154">
|
||||
|
||||
<p>Get help
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="420">
|
||||
|
||||
<p>./check_snmp_mem.pl <b>-h</b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="154">Verbose output</td>
|
||||
|
||||
<td class="SectionBody" width="420">./check_snmp_mem.pl -H <IP>
|
||||
|
||||
-C <com> -w 80 -c 81 <b>-v</b></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="154">snmpv3 login</td>
|
||||
|
||||
<td class="SectionBody" width="420">./check_snmp_mem.pl -H 127.0.0.1
|
||||
|
||||
-l login -x passwd<b></b></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="154">
|
||||
|
||||
<p>
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="420">
|
||||
|
||||
<p class="NewsItemDate">Unix/Linux</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="154">
|
||||
|
||||
<p>%used of <br>
|
||||
|
||||
- RAM < 99% and 100%<br>
|
||||
|
||||
- Swap : < 20% and 30%
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="420">
|
||||
|
||||
<p>./check_snmp_mem.pl -H <IP> -C <com> <b> -w 99,20
|
||||
|
||||
-c 100,30</b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="154">
|
||||
|
||||
<p>Same with no warning levels for memory
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="420">
|
||||
|
||||
<p>./check_snmp_mem.pl -H <IP> -C <com> -w <b>0</b>,20
|
||||
|
||||
-c 100,30</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="NewsItemDate" valign = top width="154">
|
||||
|
||||
<p>Check memory on Cisco
|
||||
|
||||
</td>
|
||||
|
||||
<td class="SectionBody" width="420">
|
||||
|
||||
<p>./check_snmp_mem.pl -H <IP> -C <com> <b>-I -w
|
||||
|
||||
90% -c 98%</b></p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p class="NewsItemDate">Output of check_snmp_mem.pl -h <</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="SectionBody" valign = top>
|
||||
|
||||
<p class="SectionBody">
|
||||
|
||||
<pre>
|
||||
|
||||
SNMP Memory Monitor for Nagios version 1.1
|
||||
|
||||
(c)2004-2006 - Patrick Proy
|
||||
|
||||
|
||||
|
||||
Usage: ./check_snmp_mem.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -w <warn level> -c <crit level> [-I|-N|-E] [-f] [-m] [-t <timeout>] [-V]
|
||||
|
||||
-v, --verbose
|
||||
|
||||
print extra debugging information (including interface list on the system)
|
||||
|
||||
-h, --help
|
||||
|
||||
print this help message
|
||||
|
||||
-H, --hostname=HOST
|
||||
|
||||
name or IP address of host to check
|
||||
|
||||
-C, --community=COMMUNITY NAME
|
||||
|
||||
community name for the host's SNMP agent (implies SNMP v1 or v2c with option)
|
||||
|
||||
-2, --v2c
|
||||
|
||||
Use snmp v2c
|
||||
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD
|
||||
|
||||
Login and auth password for snmpv3 authentication
|
||||
|
||||
If no priv password exists, implies AuthNoPriv
|
||||
|
||||
-X, --privpass=PASSWD
|
||||
|
||||
Priv password for snmpv3 (AuthPriv protocol)
|
||||
|
||||
-L, --protocols=<authproto>,<privproto>
|
||||
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)
|
||||
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
|
||||
-P, --port=PORT
|
||||
|
||||
SNMP port (Default 161)
|
||||
|
||||
-w, --warn=INTEGER | INT,INT
|
||||
|
||||
warning level for memory in percent (0 for no checks)
|
||||
|
||||
Default (-N switch) : comma separated level for Real Memory and Swap
|
||||
|
||||
-I switch : warning level
|
||||
|
||||
-c, --crit=INTEGER | INT,INT
|
||||
|
||||
critical level for memory in percent (0 for no checks)
|
||||
|
||||
Default (-N switch) : comma separated level for Real Memory and Swap
|
||||
|
||||
-I switch : critical level
|
||||
|
||||
-N, --netsnmp (default)
|
||||
|
||||
check linux memory & swap provided by Net SNMP
|
||||
|
||||
-m, --memcache
|
||||
|
||||
include cached memory in used memory (only with Net-SNMP)
|
||||
|
||||
-I, --cisco
|
||||
|
||||
check cisco memory (sum of all memory pools)
|
||||
|
||||
-E, --hp
|
||||
|
||||
check HP proccurve memory
|
||||
|
||||
-f, --perfdata
|
||||
|
||||
Performance data output
|
||||
|
||||
-t, --timeout=INTEGER
|
||||
|
||||
timeout for SNMP in seconds (Default: 5)
|
||||
|
||||
-V, --version
|
||||
|
||||
prints version number
|
||||
|
||||
</pre>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
<A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
|
||||
trademarks of Ethan Galstad.</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
|
||||
</HTML>
|
||||
|
||||
|
||||
|
|
@ -1,377 +0,0 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Nagios plugins</TITLE>
|
||||
<META NAME="Keywords" CONTENT="nagios,plugins,perl,snmp,proy">
|
||||
<STYLE type="text/css">
|
||||
<!--
|
||||
.Default { font-family: verdana,arial,serif; font-size: 10pt; }
|
||||
.ProgramTitle { font-family: verdana,arial,serif; font-size: 18pt; font-weight: bold;}
|
||||
.Copyright { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
.Email { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
.NewsItem { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
.NewsItemOdd { font-family: verdana,arial,serif; font-size: 8pt; background-color: #DBDBDB;}
|
||||
.NewsItemEven { font-family: verdana,arial,serif; font-size: 8pt; background-color: #C4C2C2;}
|
||||
.NewsItemUrgent { font-family: verdana,arial,serif; font-size: 8pt; background-color: #ccff99;}
|
||||
.NewsItemDate { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
|
||||
.SectionTitle { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; text-decoration: underline;}
|
||||
.SectionBody { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
.ModificationDate { font-family: verdana,arial,serif; font-size: 7pt; }
|
||||
.Disclaimer { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
A.SideNavBarItem { font-family: verdana,arial,serif; background-color : black; color: #e7e7e7; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarHotItem { font-family: verdana,arial,serif; background-color : black; color: #ffcc66; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarHotItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<body background="img/sideback.jpg" bgcolor="#FFFFFF" text="black" class="Default">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!-- Begin Side Bar -->
|
||||
<table border="0" width="125" valign=top>
|
||||
<tr>
|
||||
<td><a href="http://nagios.manubulon.com/" class="SideNavBarItem" >Home</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><BR>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Side Bar -->
|
||||
</td>
|
||||
<td valign=top>
|
||||
<table border="0" valign=top>
|
||||
<tr>
|
||||
<td class="ProgramTitle"> Snmp process check</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="NewsItemDate">Script : check_snmp_process.pl</p>
|
||||
<p class="SectionTitle"> Last update : Jun 09 2007</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<p class="SectionTitle">Description : </p>
|
||||
<p class="SectionBody">Checks by snmp v1 or v3 if a process is running
|
||||
and how many instances are running (minimum & maximum). <br>
|
||||
It is also possible to check memory and cpu used by one or a group
|
||||
of process<br>
|
||||
<br>
|
||||
Works on Windows, Linux/Unix, AS400.</p>
|
||||
<p class="SectionBody"> Vérifie par snmp v1 ou v3 si un process tourne
|
||||
et combien d'instances de ce process tournent (minimum et maximum).<br>
|
||||
Il est également possible de vérifier la mémoire
|
||||
et le cpu utilisé.<br>
|
||||
<br>
|
||||
<span class="SectionTitle"> Standard checks<br>
|
||||
</span></p>
|
||||
<p class="SectionBody">The plugin checks if there is at least one
|
||||
process matching the filter (<b>-n </b>option) when no warning or
|
||||
critical levels are set. <br>
|
||||
The filter is treated as a regular expression by default, but you
|
||||
can deactivate this (<b>-r</b>)</p>
|
||||
<p class="SectionBody">With the following options, you can add to your process selection : </p>
|
||||
<p class="SectionBody">-f : get full path of the script instead of only it's name</p>
|
||||
<p class="SectionBody">-A : add parameters with the script name</p>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th class="SectionBody" scope="col">Option</th>
|
||||
<th class="SectionBody" scope="col">how the script will see the process </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">None</td>
|
||||
<td><span class="SectionBody">named</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">-f</td>
|
||||
<td><span class="SectionBody">/usr/sbin/named</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">-A</td>
|
||||
<td><span class="SectionBody">named -u named -t /var/named/chroot</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SectionBody">-f -A </td>
|
||||
<td><span class="SectionBody">/usr/sbin/named -u named -t /var/named/chroot</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="SectionBody">Warning : the -f & -A option will not function properly for Windows hosts (the snmp agent don't give this information)</p>
|
||||
<p class="SectionBody"> You can use -w and -c options to set the warning
|
||||
and critical levels : <br>
|
||||
<b>-w <minW>,<maxW> </b>: with minW and maxW the minimum
|
||||
and maximum number of processes.<br>
|
||||
<br>
|
||||
<b>-c <minC>,<maxC></b> : same thing<br>
|
||||
Of course : <b>minC <= minW < maxW <=maxC</b><br>
|
||||
<i><br>
|
||||
You can omit <maxW> and <maxC></i><br>
|
||||
<br>
|
||||
Saying N is the current number of processes<br>
|
||||
- N < minC : critical<br>
|
||||
- minC < N <=minW : warning<br>
|
||||
- minW< N <= maxW : OK<br>
|
||||
- maxW< N <= maxC : warning<br>
|
||||
- maxC < N : critical<br>
|
||||
</p>
|
||||
<p class="SectionTitle">Memory checks </p>
|
||||
<p class="SectionBody">The <b>-m </b>option can check the memory used
|
||||
by the selected processes.<br>
|
||||
By default, this will select the process wich use the maximum memory.
|
||||
The <b>-a</b> switch will make an average<br>
|
||||
<br>
|
||||
Ex : <b>-m 7,20 </b>will send a warning if a process uses more than
|
||||
7 Mb, and critical for more than 20Mb.</p>
|
||||
<p class="SectionTitle">CPU checks</p>
|
||||
<p class="SectionBody">When you use the <b>-u </b>option, a temporary
|
||||
file will be created in "/tmp" by default : this can be
|
||||
changed at the beginning of the script. <br>
|
||||
The file name will be : tmp_Icinga_proc.<host IP>.<process
|
||||
filter>.</p>
|
||||
<p class="SectionBody">The -u option will add all the cpu used by
|
||||
all selected process and the make the check<br>
|
||||
</p>
|
||||
<p class="SectionBody"><b>-u 91,95</b> : will send a warning if more
|
||||
than 91% of cpu is used, and critical if more than 95% is used.</p>
|
||||
<p class="SectionBody">On multiprocessor hosts, the % of cpu use can
|
||||
be > 100% : on a 4 CPU host, cpu usage can go up to 400% (the
|
||||
script doesn't check if a host is multiprocessor or not).</p>
|
||||
<p class="SectionBody">The script curently wants a minimum of 5 minutes
|
||||
between values taken from host (can be changed at the beginning
|
||||
of the scripts). You can check more than once every 5 minutes but
|
||||
don't put check-interval to more than 15 minutes.<br>
|
||||
When the script doesn't have enough data to compute the CPU use
|
||||
(for example, the first time it is run), then it will return a UNKNOWN
|
||||
status. </p>
|
||||
<p class="SectionBody"><b>Msg size option </b>(<i>-o</i><b><i> </i></b>option)</p>
|
||||
<p class="SectionBody">In case you get a "ERROR: running table
|
||||
: Message size exceeded maxMsgSize" error, you may need to
|
||||
adjust the maxMsgSize, i.e. the maximum size of snmp message with
|
||||
the -o option. Try a value with the -o AND the -v option : the script
|
||||
will output the actual value so you can add some octets to it with
|
||||
the -o option.</p>
|
||||
<p class="SectionBody"><span class="SectionTitle">SNMP Login</span><br>
|
||||
</p>
|
||||
<p class="SectionBody">See <a href="index_info.html">snmp info page</a></p>
|
||||
<p class="SectionTitle">Requirements :</p>
|
||||
<p class="SectionBody"> - Perl in /usr/bin/perl - or just run 'perl
|
||||
script' <br>
|
||||
- Net::SNMP<br>
|
||||
- file 'utils.pm' in plugin diretory<br>
|
||||
</p>
|
||||
<p class="SectionBody"><a href="check_snmp_process.pl" class="SectionTitle">Dowload
|
||||
latest version : 1.5</a> </p>
|
||||
<p class="SectionBody"><a href="index_commands.html" class="SectionTitle">Configurations
|
||||
examples</a></p>
|
||||
<p class="SectionBody"><span class="SectionTitle">Changelog</span>
|
||||
: On CVS repository on sourceforge : <a href="http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/">http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/</a>.</p>
|
||||
<p class="SectionTitle">Examples :</p>
|
||||
<p class="SectionBody"><br>
|
||||
All examples below are considering the script is local directory.
|
||||
Host to be checked is 127.0.0.1 with snmp community "public".</p>
|
||||
<p class="SectionBody">If multiple interfaces are selected, all must
|
||||
be up to get an OK result</p>
|
||||
<table border="1" cellspacing="5" width="819">
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">
|
||||
<p>Get help
|
||||
</td>
|
||||
<td class="SectionBody" width="533">
|
||||
<p>./check_snmp_process.pl <b>-h</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">snmpv3 login</td>
|
||||
<td class="SectionBody" width="533">./check_snmp_process.pl -H
|
||||
127.0.0.1 -l login -x passwd<b></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">
|
||||
<p>Check if at least one process matching http is running
|
||||
</td>
|
||||
<td class="SectionBody" width="533">
|
||||
<p>./check_snmp_process.pl -H 127.0.0.1 -C public <b>-n http</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">
|
||||
<p align="right">Result example :
|
||||
</td>
|
||||
<td class="SectionBody" width="533">
|
||||
<p>3 process matching http : > 0 : OK</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">
|
||||
<p>Check if at least 3 process matching http are running
|
||||
</td>
|
||||
<td class="SectionBody" width="533">
|
||||
<p>./check_snmp_process.pl -H 127.0.0.1 -C public -n http<b>
|
||||
-w 2 -c 0</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">
|
||||
<div align="right">Result example : <br>
|
||||
(<=2 will return warning, 0 critical)</div>
|
||||
</td>
|
||||
<td class="SectionBody" width="533">3 process matching httpd :
|
||||
> 2 : OK</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">Check if at
|
||||
least one process named "httpd" exists (no regexp)</td>
|
||||
<td class="SectionBody" width="533">./check_snmp_process.pl -H
|
||||
127.0.0.1 -C public -n http <b>-r</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">
|
||||
<p align="right">Result example : </p>
|
||||
</td>
|
||||
<td class="SectionBody" width="533">3 process <b>named</b> httpd
|
||||
: > 0 : OK</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">Check process
|
||||
by their full path : check process of /opt/soft/bin/ (at least
|
||||
one) </td>
|
||||
<td class="SectionBody" width="533">./check_snmp_process.pl -H
|
||||
127.0.0.1 -C public <b>-n /opt/soft/bin/ -f</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">Check that at
|
||||
least 3 process but not more than 8 are running</td>
|
||||
<td class="SectionBody" width="533">./check_snmp_process.pl -H
|
||||
127.0.0.1 -C public -n http <b>-w 3,8 -c 0,15</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">Same checks
|
||||
+ checks maximum memory used by process (in Mb) : warning and
|
||||
critical levels</td>
|
||||
<td class="SectionBody" width="533">./check_snmp_process.pl -H
|
||||
127.0.0.1 -C public -n http -w 3,8 -c 0,15 <b>-m 9,25</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="261">Same check but
|
||||
sum all CPU used by all selected process</td>
|
||||
<td class="SectionBody" width="533">./check_snmp_process.pl -H
|
||||
127.0.0.1 -C public -n http -w 3,8 -c 0,15 -m 9,25 <b>-u 70,99</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="NewsItemDate">Output of check_snmp_process.pl -h</p>
|
||||
<table border="1" cellspacing="5">
|
||||
<tr>
|
||||
<td class="SectionBody" valign = top>
|
||||
<p>SNMP Process Monitor for Nagios version 1.5<br>
|
||||
GPL licence, (c)2004-2006 Patrick Proy</p>
|
||||
<p>Usage: ./check_snmp_process.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd) [-p <port>] -n <name> [-w <min_proc>[,<max_proc>] -c <min_proc>[,max_proc] ] [-m<warn Mb>,<crit Mb> -a -u<warn %>,<crit%> -d<delta> ] [-t <timeout>] [-o <octet_length>] [-f -A -F ] [-r] [-V] [-g]<br>
|
||||
-v, --verbose<br>
|
||||
print extra debugging information (and lists all storages)<br>
|
||||
-h, --help<br>
|
||||
print this help message<br>
|
||||
-H, --hostname=HOST<br>
|
||||
name or IP address of host to check<br>
|
||||
-C, --community=COMMUNITY NAME<br>
|
||||
community name for the host's SNMP agent (implies SNMP v1 or v2c with option)<br>
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD, -2, --v2c<br>
|
||||
Login and auth password for snmpv3 authentication <br>
|
||||
If no priv password exists, implies AuthNoPriv <br>
|
||||
-2 : use snmp v2c<br>
|
||||
-X, --privpass=PASSWD<br>
|
||||
Priv password for snmpv3 (AuthPriv protocol)<br>
|
||||
-L, --protocols=<authproto>,<privproto><br>
|
||||
<authproto> : Authentication protocol (md5|sha : default md5)<br>
|
||||
<privproto> : Priv protocole (des|aes : default des) <br>
|
||||
-p, --port=PORT<br>
|
||||
SNMP port (Default 161)<br>
|
||||
-n, --name=NAME<br>
|
||||
Name of the process (regexp)<br>
|
||||
No trailing slash !<br>
|
||||
-r, --noregexp<br>
|
||||
Do not use regexp to match NAME in description OID<br>
|
||||
-f, --fullpath<br>
|
||||
Use full path name instead of process name <br>
|
||||
(Windows doesn't provide full path name)<br>
|
||||
-A, --param<br>
|
||||
Add parameters to select processes.<br>
|
||||
ex : "named.*-t /var/named/chroot" will only select named process with this parameter <br>
|
||||
-F, --perfout<br>
|
||||
Add performance output<br>
|
||||
outputs : memory_usage, num_process, cpu_usage<br>
|
||||
-w, --warn=MIN[,MAX]<br>
|
||||
Number of process that will cause a warning <br>
|
||||
-1 for no warning, MAX must be >0. Ex : -w-1,50<br>
|
||||
-c, --critical=MIN[,MAX]<br>
|
||||
number of process that will cause an error (<br>
|
||||
-1 for no critical, MAX must be >0. Ex : -c-1,50<br>
|
||||
Notes on warning and critical : <br>
|
||||
with the following options : -w m1,x1 -c m2,x2<br>
|
||||
you must have : m2 <= m1 < x1 <= x2<br>
|
||||
you can omit x1 or x2 or both<br>
|
||||
-m, --memory=WARN,CRIT<br>
|
||||
checks memory usage (default max of all process)<br>
|
||||
values are warning and critical values in Mb<br>
|
||||
-a, --average<br>
|
||||
makes an average of memory used by process instead of max<br>
|
||||
-u, --cpu=WARN,CRIT<br>
|
||||
checks cpu usage of all process<br>
|
||||
values are warning and critical values in % of CPU usage<br>
|
||||
if more than one CPU, value can be > 100% : 100%=1 CPU<br>
|
||||
-d, --delta=seconds<br>
|
||||
make an average of <delta> seconds for CPU (default 300=5min) <br>
|
||||
-g, --getall<br>
|
||||
In some cases, it is necessary to get all data at once because<br>
|
||||
process die very frequently.<br>
|
||||
This option eats bandwidth an cpu (for remote host) at breakfast.<br>
|
||||
-o, --octetlength=INTEGER<br>
|
||||
max-size of the SNMP message, usefull in case of Too Long responses.<br>
|
||||
Be carefull with network filters. Range 484 - 65535, default are<br>
|
||||
usually 1472,1452,1460 or 1440. <br>
|
||||
-t, --timeout=INTEGER<br>
|
||||
timeout for SNMP in seconds (Default: 5)<br>
|
||||
-V, --version<br>
|
||||
prints version number<br>
|
||||
Note : <br>
|
||||
CPU usage is in % of one cpu, so maximum can be 100% * number of CPU <br>
|
||||
example : <br>
|
||||
Browse process list : <script> -C <community> -H <host> -n <anything> -v <br>
|
||||
the -n option allows regexp in perl format : <br>
|
||||
All process of /opt/soft/bin : -n /opt/soft/bin/ -f<br>
|
||||
All 'named' process : -n named<br>
|
||||
<br>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
<A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
</p>
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
trademarks of Ethan Galstad.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p> </p>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -1,358 +0,0 @@
|
|||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
|
||||
<TITLE>Nagios plugins</TITLE>
|
||||
|
||||
<META NAME="Keywords" CONTENT="nagios,plugins,perl,snmp,proy">
|
||||
|
||||
<STYLE type="text/css">
|
||||
|
||||
<!--
|
||||
|
||||
.Default { font-family: verdana,arial,serif; font-size: 10pt; }
|
||||
|
||||
.ProgramTitle { font-family: verdana,arial,serif; font-size: 18pt; font-weight: bold;}
|
||||
|
||||
.Copyright { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.Email { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
|
||||
.NewsItem { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.NewsItemOdd { font-family: verdana,arial,serif; font-size: 8pt; background-color: #DBDBDB;}
|
||||
|
||||
.NewsItemEven { font-family: verdana,arial,serif; font-size: 8pt; background-color: #C4C2C2;}
|
||||
|
||||
.NewsItemUrgent { font-family: verdana,arial,serif; font-size: 8pt; background-color: #ccff99;}
|
||||
|
||||
.NewsItemDate { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
|
||||
|
||||
.SectionTitle { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; text-decoration: underline;}
|
||||
|
||||
.SectionBody { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
.ModificationDate { font-family: verdana,arial,serif; font-size: 7pt; }
|
||||
|
||||
.Disclaimer { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
|
||||
A.SideNavBarItem { font-family: verdana,arial,serif; background-color : black; color: #e7e7e7; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem { font-family: verdana,arial,serif; background-color : black; color: #ffcc66; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
A.SideNavBarHotItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
|
||||
-->
|
||||
|
||||
</STYLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<body background="img/sideback.jpg" bgcolor="#FFFFFF" text="black" class="Default">
|
||||
|
||||
<table border="0">
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<!-- Begin Side Bar -->
|
||||
|
||||
<table border="0" width="125" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><a href="http://nagios.manubulon.com/" class="SideNavBarItem" >Home</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><BR>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td> </td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<!-- End Side Bar -->
|
||||
|
||||
</td>
|
||||
|
||||
<td valign=top>
|
||||
|
||||
<table border="0" valign=top>
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="ProgramTitle"> Snmp vrrp check</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="NewsItemDate">Script : check_snmp_vrrp.pl</p>
|
||||
|
||||
<p class="SectionTitle"> Last update : Sept 4 2006</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td valign="top">
|
||||
|
||||
<p class="SectionTitle">Description : </p>
|
||||
|
||||
<p class="SectionBody">Checks by snmp v1, v2c or v3 the vrrp status
|
||||
of all vrrp enabled interfaces. <br>
|
||||
Works on<br>
|
||||
- Nokia IP with ipso 3.X , 4.X in VRRP mode.<br>
|
||||
- Nokia IP with ipso 3.X , 4.X in clustering mode.<br>
|
||||
- Radware Linkproof<br>
|
||||
- Alteon AD4 Loadbalancers</p>
|
||||
<p class="SectionBody">Depending on the state you put as option ("master"
|
||||
or "backup") the script will get all the vrrp enables
|
||||
interface and check they are in this state. <br>
|
||||
If not, it will retrun a critical status<br>
|
||||
By default, it will check Nokia IP platforms using vrrp, you can
|
||||
test other platforms with the '-T' option :<br>
|
||||
<br>
|
||||
- Alteon<br>
|
||||
- Linkproof (VRRP)<br>
|
||||
- Nokia clustering.</p>
|
||||
<p class="SectionTitle">Nokia clustering check</p>
|
||||
<p class="SectionBody">Nokia clustering check does not have a master
|
||||
& backup state. Instead, the plugin will check : </p>
|
||||
<p class="SectionBody">- The number of cluster member<br>
|
||||
- The % load on each cluster.</p>
|
||||
<p class="SectionBody">For example <b>-s 2,90</b> will issue <br>
|
||||
- A critical level if there is not 2 members.<br>
|
||||
- A warning level if more than 90% is assigned to one cluster member.</p>
|
||||
<p class="SectionBody">To have a long output, put the '-g' option.</p>
|
||||
|
||||
<p class="SectionBody"><span class="SectionTitle">SNMP Login</span><br>
|
||||
</p>
|
||||
<p class="SectionBody">See <a href="index_info.html">snmp info page</a></p>
|
||||
<p class="SectionBody"><span class="SectionTitle">French </span>:
|
||||
Vérifie par snmp v1 ou v3 l'état des interfaces vrrp : Nokia,
|
||||
Linkproof, Altéon ou l'état d'un cluster Nokia.</p>
|
||||
|
||||
<p class="SectionTitle">Requirements :</p>
|
||||
|
||||
<p class="SectionBody"> - Perl in /usr/bin/perl - or just run 'perl
|
||||
|
||||
script' <br>
|
||||
|
||||
- Net::SNMP<br>
|
||||
|
||||
- file 'utils.pm' in plugin diretory<br>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"><a href="check_snmp_vrrp.pl" class="SectionTitle">Dowload
|
||||
lastest version : 1.3</a> </p>
|
||||
|
||||
<p class="SectionBody"><a href="index_commands.html" class="SectionTitle">Configurations
|
||||
|
||||
examples</a></p>
|
||||
|
||||
<p class="SectionTitle">Examples :</p>
|
||||
|
||||
<p class="SectionBody"><br>
|
||||
|
||||
All examples below are considering the script is local directory.
|
||||
|
||||
Host to be checked is 127.0.0.1 with snmp community "public".</p>
|
||||
|
||||
<p class="SectionBody">If multiple interfaces are selected, all must
|
||||
|
||||
be up to get an OK result</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
<p>Get help
|
||||
</td>
|
||||
<td class="SectionBody" width="387">
|
||||
<p>./check_snmp_vrrp.pl <b>-h</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">snmpv3 login</td>
|
||||
<td class="SectionBody" width="387">./check_snmp_vrrp.pl -H 127.0.0.1
|
||||
-l login -x passwd<b></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
<p>Check vrrp state of a node to be master.
|
||||
</td>
|
||||
<td class="SectionBody" width="387">
|
||||
<p>./check_snmp_vrrp.pl -H 127.0.0.1 -C public <b>-s master</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
<div align="right">
|
||||
<p>Output example :<br>
|
||||
The ouput is : <vrid>(<state>,<status>,<priority>)
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="SectionBody" width="387">Vrid : 10(master/up/100),
|
||||
1(master/up/100), 3(master/up/100), 2(master/up/100), : All
|
||||
master :OK</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">Check vrrp state
|
||||
of a node to be backup. </td>
|
||||
<td class="SectionBody" width="387">./check_snmp_vrrp.pl -H 127.0.0.1
|
||||
-C public <b>-s backup</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">
|
||||
<p align="right">Output example :
|
||||
</td>
|
||||
<td class="SectionBody" width="387">
|
||||
<p>Vrid : 1(backup/up/95), 3(backup/up/95), 10(backup/up/95),
|
||||
2(backup/up/95), : All backup :OK</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">Test a Linkproof</td>
|
||||
<td class="SectionBody" width="387">./check_snmp_vrrp.pl -H 127.0.0.1
|
||||
-C public -s master <b>-T lp</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="282">Test a Nokia
|
||||
cluster : 2 cluster members and max 90% load assigned to one
|
||||
cluster. </td>
|
||||
<td class="SectionBody" width="387">./check_snmp_vrrp.pl -H 127.0.0.1
|
||||
-C public <b>-s 2,90%-T ipso</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p class="NewsItemDate"><span class="SectionTitle">Changelog</span>
|
||||
: On CVS repository on sourceforge : <a href="http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/">http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/</a>.</p>
|
||||
|
||||
<p class="NewsItemDate">Output of check_snmp_vrrp.pl -h</p>
|
||||
|
||||
<table border="1" cellspacing="5">
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="SectionBody" valign = top>
|
||||
<p class="SectionBody">SNMP VRRP Monitor for Nagios version
|
||||
1.3<br>
|
||||
(c)2004-2006 to my cat Ratoune - Author : Patrick Proy
|
||||
<p>Usage: ./check_snmp_vrrp.pl [-v] -H <host> -C <snmp_community>
|
||||
[-2] | (-l login -x passwd [-X pass -L <authp>,<privp>])
|
||||
-s <master|backup|num,%> [-T <nokia|alteon|lp|nsc|ipsocluster>]
|
||||
[-p <port>] [-t <timeout>] [-V]<br>
|
||||
-v, --verbose<br>
|
||||
print extra debugging information (including interface list
|
||||
on the system)<br>
|
||||
-h, --help<br>
|
||||
print this help message<br>
|
||||
-H, --hostname=HOST<br>
|
||||
name or IP address of host to check<br>
|
||||
-C, --community=COMMUNITY NAME<br>
|
||||
community name for the host's SNMP agent (implies v1 protocol)<br>
|
||||
-2, --v2c<br>
|
||||
Use snmp v2c<br>
|
||||
-l, --login=LOGIN ; -x, --passwd=PASSWD<br>
|
||||
Login and auth password for snmpv3 authentication <br>
|
||||
If no priv password exists, implies AuthNoPriv <br>
|
||||
-X, --privpass=PASSWD<br>
|
||||
Priv password for snmpv3 (AuthPriv protocol)<br>
|
||||
-L, --protocols=<authproto>,<privproto><br>
|
||||
<authproto> : Authentication protocol (md5|sha : default
|
||||
md5)<br>
|
||||
<privproto> : Priv protocole (des|aes : default des)
|
||||
<br>
|
||||
-P, --port=PORT<br>
|
||||
SNMP port (Default 161)<br>
|
||||
-T, --type=<nokia|alteon|lp|nsc|ipso><br>
|
||||
Type of vrrp router to check<br>
|
||||
nokia (default) : Nokai vrrp. Should be working for most vrrp
|
||||
routers<br>
|
||||
alteon : for Alteon AD4 Loadbalancers<br>
|
||||
lp : Radware Linkproof<br>
|
||||
nsc : Nescreen (ScreenOS 5.x NSRP)<br>
|
||||
ipso : Nokia IPSO clustering<br>
|
||||
-s, --state=master|backup|num,%<br>
|
||||
Nokia ipso clustering : number of members, max % assigned
|
||||
to nodes.<br>
|
||||
Other : check vrrp interface to be master or backup<br>
|
||||
-g, --long<br>
|
||||
Make output long even is all is OK <br>
|
||||
-t, --timeout=INTEGER<br>
|
||||
timeout for SNMP in seconds (Default: 5)<br>
|
||||
-V, --version<br>
|
||||
prints version number</p>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
|
||||
<A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
|
||||
</p>
|
||||
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
|
||||
trademarks of Ethan Galstad.</p>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p> </p>
|
||||
|
||||
</BODY>
|
||||
|
||||
</HTML>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,261 +0,0 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Nagios plugins</TITLE>
|
||||
<META NAME="Keywords" CONTENT="nagios,plugins,perl,snmp,proy">
|
||||
<STYLE type="text/css">
|
||||
<!--
|
||||
.Default { font-family: verdana,arial,serif; font-size: 10pt; }
|
||||
.ProgramTitle { font-family: verdana,arial,serif; font-size: 18pt; font-weight: bold;}
|
||||
.Copyright { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
.Email { font-family: verdana,arial,serif; font-size: 10pt;}
|
||||
.NewsItem { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
.NewsItemOdd { font-family: verdana,arial,serif; font-size: 8pt; background-color: #DBDBDB;}
|
||||
.NewsItemEven { font-family: verdana,arial,serif; font-size: 8pt; background-color: #C4C2C2;}
|
||||
.NewsItemUrgent { font-family: verdana,arial,serif; font-size: 8pt; background-color: #ccff99;}
|
||||
.NewsItemDate { font-family: verdana,arial,serif; font-size: 8pt; font-weight: bold; }
|
||||
.SectionTitle { font-family: verdana,arial,serif; font-size: 9pt; font-weight: bold; text-decoration: underline;}
|
||||
.SectionBody { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
.ModificationDate { font-family: verdana,arial,serif; font-size: 7pt; }
|
||||
.Disclaimer { font-family: verdana,arial,serif; font-size: 8pt; }
|
||||
A.SideNavBarItem { font-family: verdana,arial,serif; background-color : black; color: #e7e7e7; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarHotItem { font-family: verdana,arial,serif; background-color : black; color: #ffcc66; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
A.SideNavBarHotItem:Hover { font-family: verdana,arial,serif; background-color : black; color: #ccff33; font-size: 9pt; font-weight: bold; text-decoration: none; }
|
||||
-->
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<body background="img/sideback.jpg" bgcolor="#FFFFFF" text="black" class="Default">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td valign=top>
|
||||
<!-- Begin Side Bar -->
|
||||
<table border="0" width="125" valign=top>
|
||||
<tr>
|
||||
<td><a href="http://nagios.manubulon.com/" class="SideNavBarItem" >Home</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><BR>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- End Side Bar -->
|
||||
</td>
|
||||
<td valign=top>
|
||||
<table border="0" valign=top>
|
||||
<tr>
|
||||
<td class="ProgramTitle"> Snmp windows check</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="NewsItemDate">Script : check_snmp_win.pl</p>
|
||||
<p class="SectionTitle"> Last update : Jan 11 2007</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<p class="SectionTitle">Description : </p>
|
||||
<p class="SectionBody">Checks by snmp v1 or v3 windows specific health
|
||||
monitoring (service state for now).<br>
|
||||
<br>
|
||||
Works on Windows server (2000, 2003) maybe XP and NT.</p>
|
||||
<p class="SectionBody"> Vérifie par snmp v1 ou v3 si un(des) service
|
||||
Windows tournent.<br>
|
||||
<br>
|
||||
<span class="SectionTitle"> Service checks <br>
|
||||
</span></p>
|
||||
<p class="SectionBody">The plugin checks if there if the Windows service(s)
|
||||
he gets as input are running. <br>
|
||||
You can provide multiple services, comma separated : <br>
|
||||
<b>-n <service1>,<service2></b> </p>
|
||||
<p class="SectionBody">The script will return : <br>
|
||||
OK : if <service1> is found (and active) and <service2>
|
||||
is found (and active). <br>
|
||||
WARNING : if <service1> and <service2> match <b>more</b>
|
||||
than 2 active services.<br>
|
||||
CRITICAL : if <service1> OR <service2> don't match any
|
||||
active service. </p>
|
||||
<p class="SectionBody"><b>-N <number> </b>: will return OK if
|
||||
<number> of active services matches the filter</p>
|
||||
<p class="SectionBody"><b>-s </b>: will show all active services instead
|
||||
of the non active ones only</p>
|
||||
<p class="SectionTitle">Requirements :</p>
|
||||
<p class="SectionBody"> - Perl in /usr/bin/perl - or just run 'perl
|
||||
script' <br>
|
||||
- Net::SNMP<br>
|
||||
- file 'utils.pm' in plugin diretory<br>
|
||||
</p>
|
||||
<p class="SectionBody"><a href="check_snmp_win.pl" class="SectionTitle">Dowload
|
||||
latest version : 0.6</a> </p>
|
||||
<p class="SectionBody"><a href="index_commands.html" class="SectionTitle">Configurations
|
||||
examples</a></p>
|
||||
<p class="SectionTitle">Examples :</p>
|
||||
<p class="SectionBody"><br>
|
||||
All examples below are considering the script is local directory.
|
||||
Host to be checked is 127.0.0.1 with snmp community "public".</p>
|
||||
<p class="SectionBody">If multiple interfaces are selected, all must
|
||||
be up to get an OK result</p>
|
||||
<table border="1" cellspacing="5" width="819">
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="262">
|
||||
<p>Get help
|
||||
</td>
|
||||
<td class="SectionBody" width="532">
|
||||
<p>./check_snmp_win.pl <b>-h</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="262">snmpv3 login</td>
|
||||
<td class="SectionBody" width="532">./check_snmp_win.pl -H 127.0.0.1
|
||||
-l login -x passwd<b></b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="262">
|
||||
<p>Check if at least one process matching dns is running
|
||||
</td>
|
||||
<td class="SectionBody" width="532">
|
||||
<p>./check_snmp_win.pl -H 127.0.0.1 -C public <b>-n dns</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="262">
|
||||
<p align="right">Result example :
|
||||
</td>
|
||||
<td class="SectionBody" width="532">
|
||||
<p>1 services active (matching "dns") : OK</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="262">
|
||||
<p>Check if at least 3 process matching dns are running
|
||||
</td>
|
||||
<td class="SectionBody" width="532">
|
||||
<p>./check_snmp_win.pl -H 127.0.0.1 -C public -n http<b> -N
|
||||
2 </b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="262">
|
||||
<div align="right">Result example : <br>
|
||||
(<=2 will return warning, 0 critical)</div>
|
||||
</td>
|
||||
<td class="SectionBody" width="532">1 services active (matching
|
||||
"dns") : CRITICAL</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="262">Check if dns
|
||||
and ssh services are running</td>
|
||||
<td class="SectionBody" width="532">./check_snmp_win.pl -H 127.0.0.1
|
||||
-C public -n dns,ssh</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="262">
|
||||
<p align="right">Result example : </p>
|
||||
</td>
|
||||
<td class="SectionBody" width="532">"dns" active, "ssh"
|
||||
active : OK</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="262">Check if dns
|
||||
and toto services are running</td>
|
||||
<td class="SectionBody" width="532">./check_snmp_win.pl -H 127.0.0.1
|
||||
-C public <b>-n dns,toto</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="NewsItemDate" valign = top width="262">
|
||||
<div align="right">Result example : </div>
|
||||
</td>
|
||||
<td class="SectionBody" width="532">"toto" not active
|
||||
: CRITICAL</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p> </p>
|
||||
<p class="NewsItemDate"><span class="SectionTitle">Changelog</span>
|
||||
: On CVS repository on sourceforge : <a href="http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/">http://nagios-snmp.cvs.sourceforge.net/nagios-snmp/plugins/</a>.<br>
|
||||
</p>
|
||||
<p class="NewsItemDate">Output of check_snmp_win.pl -h</p>
|
||||
<table border="1" cellspacing="5">
|
||||
<tr>
|
||||
<td class="SectionBody" valign = top>
|
||||
<p>SNMP Windows Monitor for Nagios version 0.6<br>
|
||||
GPL licence, (c)2004-2005 Patrick Proy</p>
|
||||
<p>Usage: check_snmp_win [-v] -H <host> -C <snmp_community>
|
||||
[-2] | (-l login -x passwd) [-p <port>] -n <name>[,<name2]
|
||||
[-T=service] [-r] [-s] [-N=<n>] [-t <timeout>]
|
||||
[-V]<br>
|
||||
-v, --verbose<br>
|
||||
print extra debugging information (and lists all services)<br>
|
||||
-h, --help<br>
|
||||
print this help message<br>
|
||||
-H, --hostname=HOST<br>
|
||||
name or IP address of host to check<br>
|
||||
-C, --community=COMMUNITY NAME<br>
|
||||
community name for the host's SNMP agent (implies SNMP v1
|
||||
or v2c with option)<br>
|
||||
-2, --v2c<br>
|
||||
Use snmp v2c<br>
|
||||
-l, --login=LOGIN<br>
|
||||
Login for snmpv3 authentication (implies v3 protocol with
|
||||
MD5)<br>
|
||||
-x, --passwd=PASSWD<br>
|
||||
Password for snmpv3 authentication<br>
|
||||
-p, --port=PORT<br>
|
||||
SNMP port (Default 161)<br>
|
||||
-T, --type=service<br>
|
||||
Check type : <br>
|
||||
- service (default) checks service<br>
|
||||
-n, --name=NAME[,NAME2...]<br>
|
||||
Comma separated names of services (perl regular expressions
|
||||
can be used for every one).<br>
|
||||
By default, it is not case sensitive.<br>
|
||||
-N, --number=<n><br>
|
||||
Compare matching services with <n> instead of the number
|
||||
of names provided.<br>
|
||||
-s, --showall<br>
|
||||
Show all services in the output, instead of only the non-active
|
||||
ones.<br>
|
||||
-r, --noregexp<br>
|
||||
Do not use regexp to match NAME in service description.<br>
|
||||
-t, --timeout=INTEGER<br>
|
||||
timeout for SNMP in seconds (Default: 5)<br>
|
||||
-V, --version<br>
|
||||
prints version number<br>
|
||||
Note : <br>
|
||||
The script will return <br>
|
||||
OK if ALL services are in active state,<br>
|
||||
WARNING if there is more than specified (ex 2 service specified,
|
||||
3 active services matching), <br>
|
||||
CRITICAL if at least one of them is non active.<br>
|
||||
The -n option will allows regexp in perl format <br>
|
||||
-n "service" will match 'service WINS' 'sevice DNS'
|
||||
etc...<br>
|
||||
It is not case sensitive by default : WINS = wins</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p class="SectionBody">This project is hosted on : <br>
|
||||
<A href="http://sourceforge.net/projects/nagios-snmp"> <IMG src="http://sourceforge.net/sflogo.php?group_id=134917&type=5" width="210" height="62" border="0" alt="SourceForge.net Logo" /></A>
|
||||
</p>
|
||||
<p class="SectionBody"> Nagios and the Nagios logo are registered
|
||||
trademarks of Ethan Galstad.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p> </p>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue