Compare commits

...

130 commits
CI ... master

Author SHA1 Message Date
Jan Wagner 701ad1159a check_nwc_health: Update to 10.3 2022-10-20 12:17:41 +02:00
Jan Wagner c9d0bd759b Prepare release 2022-05-02 14:08:07 +02:00
Jan Wagner f20f327eec Auto update of debian/cobtrol 2022-05-02 14:05:48 +02:00
waja db2b665887
Merge pull request #39 from waja/38-check_smart-update-to-6-13-0
check_smart: update to 6.13.0
2022-04-27 16:17:07 +02:00
Jan Wagner caf760b421 check_smart: Update to 6.13.0 2022-04-27 16:07:05 +02:00
Jan Wagner 2e59122227 check_nextcloud: Update watch and version information in control file 2022-04-27 16:05:08 +02:00
Jan Wagner bd8a94bf65 check_nextcloud: adjust d/p/check_nextcloud/shebang 2022-04-26 16:51:46 +02:00
Jan Wagner 7c9978122a check_nextcloud: Update to 2.0 2022-04-26 16:48:45 +02:00
Jan Wagner 236700d78f Prepare release 2022-03-22 19:53:59 +01:00
Jan Wagner a1fcd7829d Auto update of debian/README.Debian.plugins 2022-03-22 19:52:24 +01:00
Jan Wagner 577b3149d7 Auto update of debian/copyright 2022-03-22 19:51:58 +01:00
Jan Wagner 23dc31c8ca Auto update of debian/control 2022-03-22 19:51:36 +01:00
Jan Wagner cd2b375667 check_nwc_health: Update to 10.1.0.1 2022-03-22 18:28:59 +01:00
Jan Wagner c8ae2e0a3d Adding ethMon plugin 2022-03-22 18:28:59 +01:00
waja e384cab2a4
Merge pull request #35 from waja/dependabot-github_actions-actions-checkout-3 2022-03-02 08:02:56 +01:00
dependabot[bot] 07aecaf763
build(deps): bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 04:25:02 +00:00
Jan Wagner ed62d581b6 check_nwc_health: Also add libjson-xs-perl as new recommend 2022-02-21 09:51:13 +01:00
waja 139b2d6563
Merge pull request #34 from waja/bugfix/33-libjson-perl-as-recommend-missing
libjson-perl and libfile-slurp-perl as recommend missing
2022-02-20 14:27:59 +01:00
Jan Wagner 12e3504d8a check_nwc_health: Adding libjson-perl and libfile-slurp-perl as recommend 2022-02-20 14:22:42 +01:00
waja 529f82cccd
Merge pull request #32 from waja/bugfix/31-check_sieve-needs-disabled-epn
check_sieve: needs disabled epn
2022-02-20 14:15:05 +01:00
Jan Wagner b8eb749871 check_sieve: disable epn 2022-02-20 14:05:58 +01:00
Jan Wagner a967689263 New changelog 2022-02-20 14:03:33 +01:00
Jan Wagner b0924750e5 Prepare release 2022-02-20 12:47:51 +01:00
Jan Wagner c25f3f271d Auto update of debian/README.Debian.plugins 2022-02-20 12:45:00 +01:00
Jan Wagner 6b2b9a340b Auto update of debian/cobtrol 2022-02-20 12:43:29 +01:00
Jan Wagner bdb03d8a4b Auto update of debian/copyright 2022-02-20 12:43:10 +01:00
Jan Wagner b5bb786dc1 check_vgfree: Fix watch configuration and version in d/control 2022-02-20 11:43:47 +01:00
Jan Wagner 6bebf057c7 check_redis: Fix regular expression for watch 2022-02-20 11:41:08 +01:00
waja 8ccc6c1f15
Merge pull request #29 from waja/feature/28-check_nwc_health-Update-to-10-1
check_nwc_health: Update to 10.1
2022-02-20 10:47:24 +01:00
waja 4b69a0077a
Merge pull request #27 from waja/feature/26-check_esxi_hardware-Update-to-20210809
check_esxi_hardware: Update to 20210809
2022-02-20 10:40:24 +01:00
Jan Wagner 5e1abd1674 check_nwc_health: Update to 10.1 2022-02-20 10:39:00 +01:00
Jan Wagner 9dc411381a check_esxi_hardware: Update to 20210809 2022-02-20 10:32:30 +01:00
Jan Wagner 7661b7ba44 check_esxi_hardware: USe a more exact watch URL 2022-02-20 10:30:20 +01:00
waja 16e37413ed
Merge pull request #25 from waja/feature/lintian-brush
lintian brush
2022-02-20 10:25:55 +01:00
Jan Wagner fe5636a618 Trim trailing whitespace.
Changes-By: lintian-brush
Fixes: lintian: trailing-whitespace
See-also: https://lintian.debian.org/tags/trailing-whitespace.html
2022-02-19 22:41:25 +00:00
Jan Wagner 023a659532 Use canonical URL in Vcs-Git.
Changes-By: lintian-brush
Fixes: lintian: vcs-field-not-canonical
See-also: https://lintian.debian.org/tags/vcs-field-not-canonical.html
2022-02-19 22:32:05 +00:00
Jan Wagner 6ac31e169c Use secure URI in Vcs control headers: Vcs-Browser, Vcs-Git.
Changes-By: lintian-brush
Fixes: lintian: vcs-field-uses-insecure-uri
See-also: https://lintian.debian.org/tags/vcs-field-uses-insecure-uri.html
2022-02-19 22:32:04 +00:00
Jan Wagner 8ce56194cc Update renamed lintian tag names in lintian overrides.
Changes-By: lintian-brush
Fixes: lintian: renamed-tag
See-also: https://lintian.debian.org/tags/renamed-tag.html
2022-02-19 22:32:02 +00:00
Jan Wagner 91b1867309 Change priority extra to priority optional.
Changes-By: lintian-brush
Fixes: lintian: priority-extra-is-replaced-by-priority-optional
See-also: https://lintian.debian.org/tags/priority-extra-is-replaced-by-priority-optional.html
2022-02-19 22:32:01 +00:00
Jan Wagner 8e5d8ec82c Trim trailing whitespace.
Changes-By: lintian-brush
Fixes: lintian: trailing-whitespace
See-also: https://lintian.debian.org/tags/trailing-whitespace.html
2022-02-19 22:32:00 +00:00
waja 179f643a9c
Merge pull request #24 from waja/feature/14-Add-check_es_system
Add check_es_system
2022-02-19 22:02:57 +01:00
Jan Wagner a2422ebd49 check_es_system: Adding new plugin 2022-02-19 22:00:20 +01:00
waja b91fc10fa0
Merge pull request #23 from waja/feature/15-Add-check_vg_size-or-check_vgfree
Add check_vgfree
2022-02-19 20:21:10 +01:00
Jan Wagner 1effd2422a check_vgfree: Adding new plugin 2022-02-19 20:12:22 +01:00
waja 71a9a9e8ad
Merge pull request #22 from waja/feature/16-Add-check_wireguard
Add check_wireguard
2022-02-19 19:14:44 +01:00
Jan Wagner 147a2a6896 check_wireguard: Adding new plugin 2022-02-19 19:12:36 +01:00
Jan Wagner 46c6a102b8 Version v1.5 is way to old 2022-02-19 18:56:13 +01:00
Jan Wagner c874d999e0 check_ipsec: Remove from package 2022-02-19 18:37:24 +01:00
waja 092c3a5435
Merge pull request #20 from waja/feature/5-undefined
Update check_smart
2022-02-19 18:29:59 +01:00
Jan Wagner 8aaac360a1 check_smart: Update to new upstream 2022-02-19 18:25:56 +01:00
Jan Wagner 721aa2c852 Fix version 2022-02-19 18:16:32 +01:00
waja 391557f1b2
Merge pull request #19 from waja/feature/13-Add-check_oom-killer
Add check_oom
2022-02-19 18:12:47 +01:00
Jan Wagner c175581409 Adding check_oom 2022-02-19 17:30:37 +01:00
Jan Wagner bbf8984c1b Better not to autoclose PR 2022-02-19 17:00:28 +01:00
Jan Wagner 66b38cf650 use dedicated version for create-issue-branch 2022-02-19 16:59:14 +01:00
Jan Wagner f476a6f37e Switching to auto mode and close issues with PR 2022-02-19 16:57:08 +01:00
waja 306c791445
Merge pull request #18 from waja/issue_branches
Adding automated issue branches
2022-02-19 16:43:14 +01:00
Jan Wagner b487452577 Adding automated issue branches 2022-02-19 16:40:34 +01:00
waja f41f36154a
Merge pull request #12 from waja/dependabot-github_actions-skx-github-action-publish-binaries-release-2.0
build(deps): bump skx/github-action-publish-binaries from release-0.15 to 2.0
2021-09-28 15:06:59 +02:00
dependabot[bot] 56d37b5b5d
build(deps): bump skx/github-action-publish-binaries
Bumps [skx/github-action-publish-binaries](https://github.com/skx/github-action-publish-binaries) from release-0.15 to 2.0. This release includes the previously tagged commit.
- [Release notes](https://github.com/skx/github-action-publish-binaries/releases)
- [Commits](https://github.com/skx/github-action-publish-binaries/compare/release-0.15...release-2.0)

---
updated-dependencies:
- dependency-name: skx/github-action-publish-binaries
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-27 04:21:41 +00:00
Jan Wagner 82aeb14a25 New changelog 2021-07-21 17:02:48 +02:00
Jan Wagner 17b322f443 Prepare release 2021-07-21 16:02:42 +02:00
Jan Wagner 3c03495e47 Auto update of debian/control 2021-07-21 16:01:04 +02:00
Jan Wagner 8ba8ea8f0d ci: pin action versions 2021-07-21 15:37:44 +02:00
Jan Wagner 0ac7e5c757 check_nwc_health: Update to 8.4 2021-07-21 15:11:26 +02:00
Jan Wagner bfd168f5cd Drop d/patches/check_qnap_health/fix_strPart 2021-07-21 15:11:10 +02:00
Jan Wagner ab5f0b8c7f check_qnap_health: Update to 1.01 2021-07-21 15:03:06 +02:00
Jan Wagner 088dc0d337 Auto update of debian/control 2021-07-21 14:57:25 +02:00
Jan Wagner 9df31e7682 Adding check_keepalived 2021-07-21 13:11:36 +02:00
Jan Wagner c9eab33a18 Adding Dependabot config 2021-07-16 23:07:57 +02:00
Jan Wagner 6660a85f5b d/source/options: Adding .github to diff ignore 2021-02-05 12:36:11 +01:00
Jan Wagner 92f865099d d/control: Bump Standards-Version to 4.5.1, no changes needed 2020-12-29 18:57:56 +01:00
Jan Wagner 0f776a8b12 Enhancing ci builds 2020-12-27 22:55:02 +01:00
Jan Wagner ba9e7aa793 Merge branch 'github_ci_release' into development 2020-11-07 21:14:37 +01:00
waja 0430bdcd47
Merge pull request #7 from waja/github_ci_release
GitHub ci release
2020-11-07 21:07:43 +01:00
Jan Wagner 9e126706cc Adding initial release action 2020-11-06 18:23:00 +01:00
Jan Wagner 9dd1253858 Adding initial release action 2020-11-06 14:01:55 +01:00
Jan Wagner e2d7788c6e Rename job 2020-11-06 00:35:43 +01:00
Jan Wagner 8f7842acf9 Rename yaml file 2020-11-06 00:35:04 +01:00
Jan Wagner 8e92d0691c Remove unneeded code comments 2020-11-06 00:33:04 +01:00
Jan Wagner 2dd4995992 Prepare release 2020-11-06 00:20:55 +01:00
waja 52fd18c887 Merge pull request #6 from waja/github_ci
Adding initial version of packaging test
2020-11-06 00:19:26 +01:00
Jan Wagner c912af176b Adding initial version of packaging test 2020-11-05 23:57:38 +01:00
Jan Wagner b4741c37f2 Prepare release 2020-10-28 09:53:47 +01:00
Jan Wagner 74bdb31bb6 d/control: Update 2020-10-28 09:50:57 +01:00
Jan Wagner 4e5b96d3ee d/copyright: Auto update 2020-10-28 09:50:38 +01:00
Jan Wagner 4dcc659638 Adding check_esxi_hardware 2020-10-28 09:48:05 +01:00
Jan Wagner 634170ac9b check_openvpn/control: Update Homepage and watch 2020-10-28 09:12:24 +01:00
Jan Wagner e58c4069f2 check_sentinel/control: Update Homepage and watch 2020-10-28 09:10:18 +01:00
Jan Wagner 377dd27ee3 Removing symlink for check_qnap3 and adding check_iftraffic64 2020-10-28 08:54:11 +01:00
Jan Wagner aea814e242 Adding check_iftraffic64 2020-10-26 17:42:40 +01:00
Jan Wagner 2889ce6fb6 Addingd/p/check_qnap_health/fix_strPart 2020-10-26 17:02:21 +01:00
Jan Wagner 51da819380 check_qnap3: remove in favout of check_qnap_health 2020-10-26 16:57:11 +01:00
Jan Wagner 126fad709e Prepare release 2020-10-23 13:47:26 +02:00
Jan Wagner 13dd9d8569 d/control: Update 2020-10-23 13:46:40 +02:00
Jan Wagner 8692bf3f37 Update Recommends for check_qnap_health 2020-10-23 13:46:18 +02:00
Jan Wagner b052a862d5 Update check_qnap_health 2020-10-23 13:34:34 +02:00
Jan Wagner 8376586d3f New changelog 2020-10-22 23:36:13 +02:00
Jan Wagner c5f57c694a Prepare release 2020-10-22 21:15:52 +02:00
Jan Wagner c900d80f14 d/copyright: Auto update 2020-10-22 20:27:18 +02:00
Jan Wagner 216bbfb414 d/control: Auto update 2020-10-22 20:27:04 +02:00
Jan Wagner 2914fcb832 Adding link for check_qnap_health 2020-10-22 20:26:43 +02:00
Jan Wagner e553414387 Adding check_qnap_health 2020-10-22 20:26:02 +02:00
Jan Wagner 27e5cd8898 Prepare release 2020-10-22 17:13:15 +02:00
Jan Wagner 8db15a8443 Fixing broken symlink 2020-10-22 17:12:45 +02:00
Jan Wagner 7e40de85ac Prepare release 2020-10-22 16:44:22 +02:00
Jan Wagner 92447f086d Adding link for check_qnap3.sh 2020-10-22 16:43:31 +02:00
Jan Wagner d6ba386327 Prepare release 2020-10-22 15:51:18 +02:00
Jan Wagner 79c1b18711 d/copyright: Auto update 2020-10-22 15:49:59 +02:00
Jan Wagner 34e2aabf84 d/control: Auto update 2020-10-22 15:49:43 +02:00
Jan Wagner 9ff9923971 Adding check_qnap3 2020-10-22 15:48:09 +02:00
Jan Wagner 5218397d0d Adding symlink for check_nwc_health 2020-10-14 20:34:56 +02:00
Jan Wagner 857f689f4c New changelog 2020-09-17 12:40:22 +02:00
Jan Wagner 42c2018d0a Prepare release 2020-09-16 12:06:13 +02:00
Jan Wagner e132732325 Auto update d/control 2020-09-16 12:05:17 +02:00
Jan Wagner f2db6c2265 Update check_nwc_health to 7.12.1.3 2020-09-16 12:02:22 +02:00
Jan Wagner 7d410af3f1 Auto update d/README.Debian.plugins 2020-09-15 12:37:20 +02:00
Jan Wagner 43d5911a57 Auto update d/control 2020-09-15 12:28:38 +02:00
Jan Wagner 1a2be29176 Auto update d/copyright 2020-09-15 12:28:27 +02:00
Jan Wagner f12c75bbbb Adding check_iostats 0.1 2020-09-15 12:07:25 +02:00
Jan Wagner a6b217c8f5 Providing symlink for check_iostat, that icinga2 can find it where it is expected 2020-09-11 14:45:00 +02:00
Jan Wagner a22a9e349b Adding empty check_iostat/copyright 2020-09-11 14:37:05 +02:00
Jan Wagner abeb1ba95b Auto update d/README.Debian.plugins 2020-09-11 14:32:46 +02:00
Jan Wagner 655f76070b Auto update d/control 2020-09-11 14:31:41 +02:00
Jan Wagner db8718849a Adding check_iostat 0.0.9 2020-09-11 14:30:07 +02:00
Jan Wagner 605709f5fe New changelog 2020-09-10 16:52:33 +02:00
Jan Wagner d014bfa386 Prepare release 2020-09-10 16:10:26 +02:00
Jan Wagner c5b434c7ea Auto update of d/control 2020-09-10 16:08:10 +02:00
Jan Wagner 899e09699c Migrating over to python3 2020-09-10 16:07:08 +02:00
Jan Wagner 98a99aa548 Updating d/packaging-helper.py from monitoring-plugins-contrib 2020-09-10 16:01:12 +02:00
626 changed files with 23356 additions and 3408 deletions

12
.github/dependabot.yml vendored Normal file
View 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

20
.github/issue-branch.yml vendored Normal file
View file

@ -0,0 +1,20 @@
mode: auto
branchName: '${issue.number}-${issue.title[0,40]}'
gitSafeReplacementChar: '-'
branches:
- label: question
skip: true
- label: feature
prefix: feature/
- label: bug
prefix: bugfix/
- label: security
prefix: security/
- label: automation
prefix: automation/
openDraftPR: true
copyIssueDescriptionToPR: false
copyIssueLabelsToPR: true
copyIssueAssigneeToPR: true
copyIssueProjectsToPR: false
copyIssueMilestoneToPR: true

View file

@ -0,0 +1,25 @@
name: Tools - Automate Issue Branch
on:
issues:
types: [ assigned ]
issue_comment:
types: [ created ]
jobs:
create_issue_branch_job:
runs-on: ubuntu-latest
permissions:
actions: read
checks: write
contents: write
deployments: none
issues: write
packages: none
pull-requests: write
repository-projects: none
security-events: none
steps:
- name: Create Issue Branch
uses: robvanderleek/create-issue-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

35
.github/workflows/packaging_test.yml vendored Normal file
View file

@ -0,0 +1,35 @@
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@v3
env:
DEBIAN_FRONTEND: "noninteractive"
- name: Remove github artefacts
run: |
rm -rf .git*
- 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.4.0
with:
artifacts_directory: debian/build/release/
- name: Debug
run: |
ls -la

70
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,70 @@
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@v3
- 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@v3
env:
DEBIAN_FRONTEND: "noninteractive"
- name: Remove github artefacts
run: |
rm -rf .git*
- 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.4.0
with:
artifacts_directory: debian/build/release/
# - 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/*

10
check_es_system/Makefile Normal file
View file

@ -0,0 +1,10 @@
#/usr/bin/make -f
PLUGIN = src/check_es_system
CLEANEXTRAFILES = $(PLUGIN)
DOCFILES = src/README.md
include ../common.mk
src/$(PLUGIN): src/$(PLUGIN).sh
cp $< $@

View file

@ -0,0 +1,22 @@
---
sudo: required
dist: focal
language: generic
services:
- elasticsearch
before_install:
- sudo apt-get update -q
- sudo apt-get install curl jq
before_script:
#- sleep 10
script:
- ./check_es_system.sh --help || true
- |
test/test_status.sh
test/test_readonly.sh

View file

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{description}
Copyright (C) {year} {fullname}
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View file

@ -0,0 +1,15 @@
# check_es_system
This is a monitoring plugin to check the status of an ElasticSearch cluster node. Besides the classical status check (green, yellow, red) this plugin also allows to monitor disk or memory usage of Elasticsearch. This is especially helpful when running Elasticsearch in the cloud (e.g. Elasticsearch as a service) because, as ES does not run on your own server, you cannot monitor the disk or memory usage. This is where this plugin comes in. Just tell the plugin how much resources (diskspace, memory capacity) you have available (-d) and it will alarm you when you reach a threshold.
Besides that, the plugin offers additional (advanced) checks of a Elasticsearch node/cluster (Java Threads, Thread Pool Statistics, Master Verification, Read-Only Indexes, ...).
Please refer to https://www.claudiokuenzler.com/monitoring-plugins/check_es_system.php for full documentation and usage examples.
Requirements
------
- The following commands must be available: `curl`, `expr`
- One of the following json parsers must be available: `jshon` or `jq` (defaults to jq)
Usage
------
./check_es_system.sh -H ESNode [-P port] [-S] [-u user] [-p pass] [-d available] -t check [-o unit] [-i indexes] [-w warn] [-c crit] [-m max_time] [-e node] [-X jq|jshon]

View file

@ -0,0 +1,761 @@
#!/bin/bash
################################################################################
# Script: check_es_system.sh #
# Author: Claudio Kuenzler www.claudiokuenzler.com #
# Purpose: Monitor ElasticSearch Store (Disk) Usage #
# Official doc: www.claudiokuenzler.com/monitoring-plugins/check_es_system.php #
# License: GPLv2 #
# GNU General Public Licence (GPL) http://www.gnu.org/ #
# 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, see <https://www.gnu.org/licenses/>. #
# #
# Copyright 2016,2018-2021 Claudio Kuenzler #
# Copyright 2018 Tomas Barton #
# Copyright 2020 NotAProfessionalDeveloper #
# Copyright 2020 tatref #
# Copyright 2020 fbomj #
# Copyright 2021 chicco27 #
# #
# History: #
# 20160429: Started programming plugin #
# 20160601: Continued programming. Working now as it should =) #
# 20160906: Added memory usage check, check types option (-t) #
# 20160906: Renamed plugin from check_es_store to check_es_system #
# 20160907: Change internal referenced variable name for available size #
# 20160907: Output now contains both used and available sizes #
# 20161017: Add missing -t in usage output #
# 20180105: Fix if statement for authentication (@deric) #
# 20180105: Fix authentication when wrong credentials were used #
# 20180313: Configure max_time for Elastic to respond (@deric) #
# 20190219: Fix alternative subject name in ssl (issue 4), direct to auth #
# 20190220: Added status check type #
# 20190403: Check for mandatory parameter checktype, adjust help #
# 20190403: Catch connection refused error #
# 20190426: Catch unauthorized (403) error #
# 20190626: Added readonly check type #
# 20190905: Catch empty cluster health status (issue #13) #
# 20190909: Added jthreads and tps (thread pool stats) check types #
# 20190909: Handle correct curl return codes #
# 20190924: Missing 'than' in tps output #
# 20191104: Added master check type #
# 20200401: Fix/handle 503 errors with curl exit code 0 (issue #20) #
# 20200409: Fix 503 error lookup (issue #22) #
# 20200430: Support both jshon and jq as json parsers (issue #18) #
# 20200609: Fix readonly check on ALL indices (issue #26) #
# 20200723: Add cluster name to status output #
# 20200824: Fix typo in readonly check output #
# 20200916: Internal renaming of -i parameter, use for tps check (issue #28) #
# 20201110: Fix thresholds in jthreads check #
# 20201125: Show names of read_only indexes with jq, set jq as default parser #
# 20210616: Fix authentication bug (#38) and non ES URL responding (#39) #
# 20211202: Added local node (-L), SSL settings (-K, -E), cpu check #
################################################################################
#Variables and defaults
STATE_OK=0 # define the exit code if status is OK
STATE_WARNING=1 # define the exit code if status is Warning
STATE_CRITICAL=2 # define the exit code if status is Critical
STATE_UNKNOWN=3 # define the exit code if status is Unknown
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin # Set path
version=1.12.0
port=9200
httpscheme=http
unit=G
include='_all'
max_time=30
parsers=(jq jshon)
################################################################################
#Functions
help () {
echo -e "$0 $version (c) 2016-$(date +%Y) Claudio Kuenzler and contributors (open source rulez!)
Usage: ./check_es_system.sh -H ESNode [-P port] [-S] [-u user -p pass|-E cert -K key] -t checktype [-o unit] [-w int] [-c int] [-m int] [-e string] [-X parser]
Options:
* -H Hostname or ip address of ElasticSearch Node
-L Run check on local node instead of cluster
-P Port (defaults to 9200)
-S Use https
-E Certs for Authentication
-K Key for Authentication
-u Username if authentication is required
-p Password if authentication is required
* -t Type of check (disk, mem, cpu, status, readonly, jthreads, tps, master)
-o Disk space unit (K|M|G) (defaults to G)
-i Space separated list of included object names to be checked (index names on readonly check, pool names on tps check)
-w Warning threshold (see usage notes below)
-c Critical threshold (see usage notes below)
-m Maximum time in seconds to wait for response (default: 30)
-e Expect master node (used with 'master' check)
-X The json parser to be used jshon or jq (default: jq)
-h Help!
*mandatory options
Threshold format for 'disk', 'mem' and 'cpu': int (for percent), defaults to 80 (warn) and 95 (crit)
Threshold format for 'tps': int,int,int (active, queued, rejected), no defaults
Threshold format for all other check types': int, no defaults
Requirements: curl, expr and one of $(IFS=,; echo "${parsers[*]}")"
exit $STATE_UNKNOWN;
}
authlogic () {
if [[ -z $user ]] && [[ -z $pass ]]; then echo "ES SYSTEM UNKNOWN - Authentication required but missing username and password"; exit $STATE_UNKNOWN
elif [[ -n $user ]] && [[ -z $pass ]]; then echo "ES SYSTEM UNKNOWN - Authentication required but missing password"; exit $STATE_UNKNOWN
elif [[ -n $pass ]] && [[ -z $user ]]; then echo "ES SYSTEM UNKNOWN - Missing username"; exit $STATE_UNKNOWN
fi
}
authlogic_cert () {
if [[ -z $cert ]] && [[ -z $key ]]; then echo "ES SYSTEM UNKNOWN - Authentication required but missing cert and key"; exit $STATE_UNKNOWN
elif [[ -n $cert ]] && [[ -z $key ]]; then echo "ES SYSTEM UNKNOWN - Authentication required but missing key"; exit $STATE_UNKNOWN
elif [[ -n $key ]] && [[ -z $cert ]]; then echo "ES SYSTEM UNKNOWN - Missing cert"; exit $STATE_UNKNOWN
fi
}
unitcalc() {
# ES presents the currently used disk space in Bytes
if [[ -n $unit ]]; then
case $unit in
K) availsize=$(expr $available / 1024); outputsize=$(expr ${size} / 1024);;
M) availsize=$(expr $available / 1024 / 1024); outputsize=$(expr ${size} / 1024 / 1024);;
G) availsize=$(expr $available / 1024 / 1024 / 1024); outputsize=$(expr ${size} / 1024 / 1024 / 1024);;
esac
if [[ -n $warning ]] ; then
warningsize=$(expr $warning \* ${available} / 100)
fi
if [[ -n $critical ]] ; then
criticalsize=$(expr $critical \* ${available} / 100)
fi
usedpercent=$(expr $size \* 100 / $available)
else echo "UNKNOWN - Shouldnt exit here. No units given"; exit $STATE_UNKNOWN
fi
}
thresholdlogic () {
if [ -n $warning ] && [ -z $critical ]; then echo "UNKNOWN - Define both warning and critical thresholds"; exit $STATE_UNKNOWN; fi
if [ -n $critical ] && [ -z $warning ]; then echo "UNKNOWN - Define both warning and critical thresholds"; exit $STATE_UNKNOWN; fi
}
default_percentage_thresholds() {
if [ -z $warning ] || [ "${warning}" = "" ]; then warning=80; fi
if [ -z $critical ] || [ "${critical}" = "" ]; then critical=95; fi
}
json_parse() {
json_parse_usage() { echo "$0: [-r] [-q] [-c] [-a] -x arg1 -x arg2 ..." 1>&2; exit; }
local OPTIND opt r q c a x
while getopts ":rqcax:" opt
do
case "${opt}" in
r) raw=1;;
q) quiet=1;; # only required for jshon
c) continue=1;; # only required for jshon
a) across=1;;
x) args+=("$OPTARG");;
*) json_parse_usage;;
esac
done
case ${parser} in
jshon)
cmd=()
for arg in "${args[@]}"; do
cmd+=(-e $arg)
done
jshon ${quiet:+-Q} ${continue:+-C} ${across:+-a} "${cmd[@]}" ${raw:+-u}
;;
jq)
cmd=()
for arg in "${args[@]}"; do
cmd+=(.$arg)
done
jq ${raw:+-r} $(IFS=; echo ${across:+.[]}"${cmd[*]}")
;;
esac
}
################################################################################
# Check for people who need help - aren't we all nice ;-)
if [ "${1}" = "--help" -o "${#}" = "0" ]; then help; exit $STATE_UNKNOWN; fi
################################################################################
# Get user-given variables
while getopts "H:LP:SE:K:u:p:d:o:i:w:c:t:m:e:X:" Input
do
case ${Input} in
H) host=${OPTARG};;
L) local=true;;
P) port=${OPTARG};;
S) httpscheme=https;;
E) cert=${OPTARG};;
K) key=${OPTARG};;
u) user=${OPTARG};;
p) pass=${OPTARG};;
d) oldavailable=${OPTARG};;
o) unit=${OPTARG};;
i) include=${OPTARG};;
w) warning=${OPTARG};;
c) critical=${OPTARG};;
t) checktype=${OPTARG};;
m) max_time=${OPTARG};;
e) expect_master=${OPTARG};;
X) parser=${OPTARG:=jq};;
*) help;;
esac
done
# Check for mandatory opts
if [[ -z ${host} ]]; then help; exit $STATE_UNKNOWN; fi
if [[ -z ${checktype} ]]; then help; exit $STATE_UNKNOWN; fi
# Check for deprecated opts
if [[ -n ${oldavailable} ]]; then
echo "ES SYSTEM UNKNOWN: -d parameter is now invalid. Capacities are now discovered directly from Elasticsearch."
exit ${STATE_UNKNOWN}
fi
# Local checks are only useful for certain check types
if [[ -n ${local} ]] && ( ! [[ ${checktype} =~ ^(cpu|mem|disk|jthreads)$ ]] ); then
echo "ES SYSTEM UNKNOWN: Node local checks (-L) only work with the following check types: cpu, mem, disk, jthreads"
exit ${STATE_UNKNOWN}
fi
################################################################################
# Check requirements
for cmd in curl expr ${parser}; do
if ! `which ${cmd} >/dev/null 2>&1`; then
echo "UNKNOWN: ${cmd} does not exist, please check if command exists and PATH is correct"
exit ${STATE_UNKNOWN}
fi
done
# Find parser
if [ -z ${parser} ]; then
for cmd in ${parsers[@]}; do
if `which ${cmd} >/dev/null 2>&1`; then
parser=${cmd}
break
fi
done
if [ -z "${parser}" ]; then
echo "UNKNOWN: No JSON parser found. Either one of the following is required: $(IFS=,; echo "${parsers[*]}")"
exit ${STATE_UNKNOWN}
fi
fi
################################################################################
# Retrieve information from Elasticsearch cluster
getstatus() {
if [[ ${local} ]]; then
esurl="${httpscheme}://${host}:${port}/_nodes/_local/stats"
else
esurl="${httpscheme}://${host}:${port}/_cluster/stats"
fi
eshealthurl="${httpscheme}://${host}:${port}/_cluster/health"
if [[ -z $user ]] && [[ -z $cert ]]; then
# Without authentication
esstatus=$(curl -k -s --max-time ${max_time} $esurl)
esstatusrc=$?
if [[ $esstatusrc -eq 7 ]]; then
echo "ES SYSTEM CRITICAL - Failed to connect to ${host} port ${port}: Connection refused"
exit $STATE_CRITICAL
elif [[ $esstatusrc -eq 28 ]]; then
echo "ES SYSTEM CRITICAL - server did not respond within ${max_time} seconds"
exit $STATE_CRITICAL
elif [[ "$esstatus" =~ "503 Service Unavailable" ]]; then
echo "ES SYSTEM CRITICAL - Elasticsearch not available: ${host}:${port} return error 503"
exit $STATE_CRITICAL
elif [[ "$esstatus" =~ "Unknown resource" ]]; then
echo "ES SYSTEM CRITICAL - Elasticsearch not available: ${esstatus}"
exit $STATE_CRITICAL
elif ! [[ "$esstatus" =~ "cluster_name" ]]; then
echo "ES SYSTEM CRITICAL - Elasticsearch not available at this address ${host}:${port}"
exit $STATE_CRITICAL
fi
# Additionally get cluster health infos
if [ $checktype = status ]; then
eshealth=$(curl -k -s --max-time ${max_time} $eshealthurl)
if [[ -z $eshealth ]]; then
echo "ES SYSTEM CRITICAL - unable to get cluster health information"
exit $STATE_CRITICAL
fi
fi
fi
if [[ -n $user ]] || [[ -n $(echo $esstatus | grep -i authentication) ]] ; then
# Authentication required
authlogic
esstatus=$(curl -k -s --max-time ${max_time} --basic -u ${user}:${pass} $esurl)
esstatusrc=$?
if [[ $esstatusrc -eq 7 ]]; then
echo "ES SYSTEM CRITICAL - Failed to connect to ${host} port ${port}: Connection refused"
exit $STATE_CRITICAL
elif [[ $esstatusrc -eq 28 ]]; then
echo "ES SYSTEM CRITICAL - server did not respond within ${max_time} seconds"
exit $STATE_CRITICAL
elif [[ "$esstatus" =~ "503 Service Unavailable" ]]; then
echo "ES SYSTEM CRITICAL - Elasticsearch not available: ${host}:${port} return error 503"
exit $STATE_CRITICAL
elif [[ "$esstatus" =~ "Unknown resource" ]]; then
echo "ES SYSTEM CRITICAL - Elasticsearch not available: ${esstatus}"
exit $STATE_CRITICAL
elif [[ -n $(echo "$esstatus" | grep -i "unable to authenticate") ]]; then
echo "ES SYSTEM CRITICAL - Unable to authenticate user $user for REST request"
exit $STATE_CRITICAL
elif [[ -n $(echo "$esstatus" | grep -i "unauthorized") ]]; then
echo "ES SYSTEM CRITICAL - User $user is unauthorized"
exit $STATE_CRITICAL
elif ! [[ "$esstatus" =~ "cluster_name" ]]; then
echo "ES SYSTEM CRITICAL - Elasticsearch not available at this address ${host}:${port}"
exit $STATE_CRITICAL
fi
# Additionally get cluster health infos
if [[ $checktype = status ]]; then
eshealth=$(curl -k -s --max-time ${max_time} --basic -u ${user}:${pass} $eshealthurl)
if [[ -z $eshealth ]]; then
echo "ES SYSTEM CRITICAL - unable to get cluster health information"
exit $STATE_CRITICAL
fi
fi
fi
if [[ -n $cert ]] || [[ -n $(echo $esstatus | grep -i authentication) ]] ; then
# Authentication with certificate
authlogic_cert
esstatus=$(curl -k -s --max-time ${max_time} -E ${cert} --key ${key} $esurl)
esstatusrc=$?
if [[ $esstatusrc -eq 7 ]]; then
echo "ES SYSTEM CRITICAL - Failed to connect to ${host} port ${port}: Connection refused"
exit $STATE_CRITICAL
elif [[ $esstatusrc -eq 28 ]]; then
echo "ES SYSTEM CRITICAL - server did not respond within ${max_time} seconds"
exit $STATE_CRITICAL
elif [[ "$esstatus" =~ "503 Service Unavailable" ]]; then
echo "ES SYSTEM CRITICAL - Elasticsearch not available: ${host}:${port} return error 503"
exit $STATE_CRITICAL
elif [[ -n $(echo "$esstatus" | grep -i "unable to authenticate") ]]; then
echo "ES SYSTEM CRITICAL - Unable to authenticate user $user for REST request"
exit $STATE_CRITICAL
elif [[ -n $(echo "$esstatus" | grep -i "unauthorized") ]]; then
echo "ES SYSTEM CRITICAL - User $user is unauthorized"
exit $STATE_CRITICAL
fi
# Additionally get cluster health infos
if [[ $checktype = status ]]; then
eshealth=$(curl -k -s --max-time ${max_time} -E ${cert} --key ${key} $eshealthurl)
if [[ -z $eshealth ]]; then
echo "ES SYSTEM CRITICAL - unable to get cluster health information"
exit $STATE_CRITICAL
fi
fi
fi
# Catch empty reply from server (typically happens when ssl port used with http connection)
if [[ -z $esstatus ]] || [[ $esstatus = '' ]]; then
echo "ES SYSTEM UNKNOWN - Empty reply from server (verify ssl settings)"
exit $STATE_UNKNOWN
fi
}
################################################################################
# Do the checks
case $checktype in
disk) # Check disk usage
getstatus
default_percentage_thresholds
if [[ ${local} ]]; then
size=$(echo $esstatus | json_parse -x 'nodes|' -x '[]' -x indices -x store -x size_in_bytes)
available=$(echo $esstatus | json_parse -x 'nodes|' -x '[]' -x fs -x total -x total_in_bytes)
else
size=$(echo $esstatus | json_parse -x indices -x store -x size_in_bytes)
available=$(echo $esstatus | json_parse -x nodes -x fs -x total_in_bytes)
fi
unitcalc
if [ -n "${warning}" ] || [ -n "${critical}" ]; then
# Handle tresholds
thresholdlogic
if [ $size -ge $criticalsize ]; then
echo "ES SYSTEM CRITICAL - Disk usage is at ${usedpercent}% ($outputsize $unit from $availsize $unit)|es_disk=${size}B;${warningsize};${criticalsize};0;${available}"
exit $STATE_CRITICAL
elif [ $size -ge $warningsize ]; then
echo "ES SYSTEM WARNING - Disk usage is at ${usedpercent}% ($outputsize $unit from $availsize $unit)|es_disk=${size}B;${warningsize};${criticalsize};0;${available}"
exit $STATE_WARNING
else
echo "ES SYSTEM OK - Disk usage is at ${usedpercent}% ($outputsize $unit from $availsize $unit)|es_disk=${size}B;${warningsize};${criticalsize};0;${available}"
exit $STATE_OK
fi
else
# No thresholds
echo "ES SYSTEM OK - Disk usage is at ${usedpercent}% ($outputsize $unit from $availsize $unit)|es_disk=${size}B;;;0;${available}"
exit $STATE_OK
fi
;;
mem) # Check memory usage
getstatus
default_percentage_thresholds
if [[ ${local} ]]; then
size=$(echo $esstatus | json_parse -x 'nodes|' -x '[]' -x jvm -x mem -x heap_used_in_bytes)
available=$(echo $esstatus | json_parse -x 'nodes|' -x '[]' -x jvm -x mem -x heap_max_in_bytes)
else
size=$(echo $esstatus | json_parse -x nodes -x jvm -x mem -x heap_used_in_bytes)
available=$(echo $esstatus | json_parse -x nodes -x jvm -x mem -x heap_max_in_bytes)
fi
unitcalc
if [ -n "${warning}" ] || [ -n "${critical}" ]; then
# Handle tresholds
thresholdlogic
if [ $size -ge $criticalsize ]; then
echo "ES SYSTEM CRITICAL - Memory usage is at ${usedpercent}% ($outputsize $unit) from $availsize $unit|es_memory=${size}B;${warningsize};${criticalsize};0;${available}"
exit $STATE_CRITICAL
elif [ $size -ge $warningsize ]; then
echo "ES SYSTEM WARNING - Memory usage is at ${usedpercent}% ($outputsize $unit from $availsize $unit)|es_memory=${size}B;${warningsize};${criticalsize};0;${available}"
exit $STATE_WARNING
else
echo "ES SYSTEM OK - Memory usage is at ${usedpercent}% ($outputsize $unit from $availsize $unit)|es_memory=${size}B;${warningsize};${criticalsize};0;${available}"
exit $STATE_OK
fi
else
# No thresholds
echo "ES SYSTEM OK - Memory usage is at ${usedpercent}% ($outputsize $unit from $availsize $unit)|es_memory=${size}B;;;0;${available}"
exit $STATE_OK
fi
;;
cpu) # Check memory usage
getstatus
default_percentage_thresholds
if [[ ${local} ]]; then
value=$(echo $esstatus | json_parse -x 'nodes|' -x '[]' -x process -x cpu -x percent)
else
value=$(echo $esstatus | json_parse -x nodes -x process -x cpu -x percent)
fi
if [ -n "${warning}" ] || [ -n "${critical}" ]; then
# Handle tresholds
thresholdlogic
if [ $value -ge $critical ]; then
echo "ES SYSTEM CRITICAL - CPU usage is at ${value}% |es_cpu=${value}%;${warning};${critical};0;100"
exit $STATE_CRITICAL
elif [ $value -ge $warning ]; then
echo "ES SYSTEM WARNING - CPU usage is at ${value}% |es_cpu=${value}%;${warning};${critical};0;100"
exit $STATE_WARNING
else
echo "ES SYSTEM OK - CPU usage is at ${value}% |es_cpu=${value}%;${warning};${critical};0;100"
exit $STATE_OK
fi
else
# No thresholds
echo "ES SYSTEM OK - CPU usage is at ${value}% |es_cpu=${value}%;${warning};${critical};0;100"
exit $STATE_OK
fi
;;
status) # Check Elasticsearch status
getstatus
status=$(echo $esstatus | json_parse -r -x status)
clustername=$(echo $esstatus | json_parse -r -x cluster_name)
shards=$(echo $esstatus | json_parse -r -x indices -x shards -x total)
docs=$(echo $esstatus | json_parse -r -x indices -x docs -x count)
nodest=$(echo $esstatus | json_parse -r -x nodes -x count -x total)
nodesd=$(echo $esstatus | json_parse -r -x nodes -x count -x data)
relocating=$(echo $eshealth | json_parse -r -x relocating_shards)
init=$(echo $eshealth | json_parse -r -x initializing_shards)
unass=$(echo $eshealth | json_parse -r -x unassigned_shards)
if [ "$status" = "green" ]; then
echo "ES SYSTEM OK - Elasticsearch Cluster \"$clustername\" is green (${nodest} nodes, ${nodesd} data nodes, ${shards} shards, ${docs} docs)|total_nodes=${nodest};;;; data_nodes=${nodesd};;;; total_shards=${shards};;;; relocating_shards=${relocating};;;; initializing_shards=${init};;;; unassigned_shards=${unass};;;; docs=${docs};;;;"
exit $STATE_OK
elif [ "$status" = "yellow" ]; then
echo "ES SYSTEM WARNING - Elasticsearch Cluster \"$clustername\" is yellow (${nodest} nodes, ${nodesd} data nodes, ${shards} shards, ${relocating} relocating shards, ${init} initializing shards, ${unass} unassigned shards, ${docs} docs)|total_nodes=${nodest};;;; data_nodes=${nodesd};;;; total_shards=${shards};;;; relocating_shards=${relocating};;;; initializing_shards=${init};;;; unassigned_shards=${unass};;;; docs=${docs};;;;"
exit $STATE_WARNING
elif [ "$status" = "red" ]; then
echo "ES SYSTEM CRITICAL - Elasticsearch Cluster \"$clustername\" is red (${nodest} nodes, ${nodesd} data nodes, ${shards} shards, ${relocating} relocating shards, ${init} initializing shards, ${unass} unassigned shards, ${docs} docs)|total_nodes=${nodest};;;; data_nodes=${nodesd};;;; total_shards=${shards};;;; relocating_shards=${relocating};;;; initializing_shards=${init};;;; unassigned_shards=${unass};;;; docs=${docs};;;;"
exit $STATE_CRITICAL
fi
;;
readonly) # Check Readonly status on given indexes
getstatus
icount=0
for index in $include; do
if [[ -z $user ]]; then
# Without authentication
settings=$(curl -k -s --max-time ${max_time} ${httpscheme}://${host}:${port}/$index/_settings)
if [[ $? -eq 7 ]]; then
echo "ES SYSTEM CRITICAL - Failed to connect to ${host} port ${port}: Connection refused"
exit $STATE_CRITICAL
elif [[ $? -eq 28 ]]; then
echo "ES SYSTEM CRITICAL - server did not respond within ${max_time} seconds"
exit $STATE_CRITICAL
fi
rocount=$(echo $settings | json_parse -r -q -c -a -x settings -x index -x blocks -x read_only | grep -c true)
roadcount=$(echo $settings | json_parse -r -q -c -a -x settings -x index -x blocks -x read_only_allow_delete | grep -c true)
if [[ $rocount -gt 0 ]]; then
output[${icount}]=" $index is read-only -"
roerror=true
fi
if [[ $roadcount -gt 0 ]]; then
output[${icount}]+=" $index is read-only (allow delete) -"
roerror=true
fi
fi
if [[ -n $user ]] || [[ -n $(echo $esstatus | grep -i authentication) ]] ; then
# Authentication required
authlogic
settings=$(curl -k -s --max-time ${max_time} --basic -u ${user}:${pass} ${httpscheme}://${host}:${port}/$index/_settings)
settingsrc=$?
if [[ $settingsrc -eq 7 ]]; then
echo "ES SYSTEM CRITICAL - Failed to connect to ${host} port ${port}: Connection refused"
exit $STATE_CRITICAL
elif [[ $settingsrc -eq 28 ]]; then
echo "ES SYSTEM CRITICAL - server did not respond within ${max_time} seconds"
exit $STATE_CRITICAL
elif [[ -n $(echo $esstatus | grep -i "unable to authenticate") ]]; then
echo "ES SYSTEM CRITICAL - Unable to authenticate user $user for REST request"
exit $STATE_CRITICAL
elif [[ -n $(echo $esstatus | grep -i "unauthorized") ]]; then
echo "ES SYSTEM CRITICAL - User $user is unauthorized"
exit $STATE_CRITICAL
fi
rocount=$(echo $settings | json_parse -r -q -c -a -x settings -x index -x blocks -x read_only | grep -c true)
roadcount=$(echo $settings | json_parse -r -q -c -a -x settings -x index -x blocks -x read_only_allow_delete | grep -c true)
if [[ $rocount -gt 0 ]]; then
if [[ "$index" = "_all" ]]; then
if [[ $parser = "jq" ]]; then
roindexes=$(echo $settings | jq -r '.[].settings.index |select(.blocks.read_only == "true").provided_name')
fi
output[${icount}]=" $rocount index(es) found read-only $roindexes -"
else output[${icount}]=" $index is read-only -"
fi
roerror=true
fi
if [[ $roadcount -gt 0 ]]; then
if [[ "$index" = "_all" ]]; then
if [[ $parser = "jq" ]]; then
roadindexes=$(echo $settings | jq -r '.[].settings.index |select(.blocks.read_only_allow_delete == "true").provided_name' | tr '\n' ' ')
fi
output[${icount}]+=" $roadcount index(es) found read-only (allow delete) $roadindexes"
else output[${icount}]+=" $index is read-only (allow delete) -"
fi
roerror=true
fi
fi
let icount++
done
if [[ $roerror ]]; then
echo "ES SYSTEM CRITICAL - ${output[*]}"
exit $STATE_CRITICAL
else
echo "ES SYSTEM OK - Elasticsearch Indexes ($include) are writeable"
exit $STATE_OK
fi
;;
jthreads) # Check JVM threads
getstatus
if [[ ${local} ]]; then
threads=$(echo $esstatus | json_parse -x 'nodes|' -x '[]' -x jvm -x threads -x count)
else
threads=$(echo $esstatus | json_parse -r -x nodes -x jvm -x "threads")
fi
if [ -n "${warning}" ] || [ -n "${critical}" ]; then
# Handle tresholds
thresholdlogic
if [[ $threads -ge $critical ]]; then
echo "ES SYSTEM CRITICAL - Number of JVM threads is ${threads}|es_jvm_threads=${threads};${warning};${critical};;"
exit $STATE_CRITICAL
elif [[ $threads -ge $warning ]]; then
echo "ES SYSTEM WARNING - Number of JVM threads is ${threads}|es_jvm_threads=${threads};${warning};${critical};;"
exit $STATE_WARNING
else
echo "ES SYSTEM OK - Number of JVM threads is ${threads}|es_jvm_threads=${threads};${warning};${critical};;"
exit $STATE_OK
fi
else
# No thresholds
echo "ES SYSTEM OK - Number of JVM threads is ${threads}|es_jvm_threads=${threads};${warning};${critical};;"
exit $STATE_OK
fi
;;
tps) # Check Thread Pool Statistics
getstatus
if [[ -z $user ]]; then
# Without authentication
threadpools=$(curl -k -s --max-time ${max_time} ${httpscheme}://${host}:${port}/_cat/thread_pool)
threadpoolrc=$?
if [[ $threadpoolrc -eq 7 ]]; then
echo "ES SYSTEM CRITICAL - Failed to connect to ${host} port ${port}: Connection refused"
exit $STATE_CRITICAL
elif [[ $threadpoolrc -eq 28 ]]; then
echo "ES SYSTEM CRITICAL - server did not respond within ${max_time} seconds"
exit $STATE_CRITICAL
fi
fi
if [[ -n $user ]] || [[ -n $(echo $esstatus | grep -i authentication) ]] ; then
# Authentication required
authlogic
threadpools=$(curl -k -s --max-time ${max_time} --basic -u ${user}:${pass} ${httpscheme}://${host}:${port}/_cat/thread_pool)
threadpoolrc=$?
if [[ $threadpoolrc -eq 7 ]]; then
echo "ES SYSTEM CRITICAL - Failed to connect to ${host} port ${port}: Connection refused"
exit $STATE_CRITICAL
elif [[ $threadpoolrc -eq 28 ]]; then
echo "ES SYSTEM CRITICAL - server did not respond within ${max_time} seconds"
exit $STATE_CRITICAL
elif [[ -n $(echo $esstatus | grep -i "unable to authenticate") ]]; then
echo "ES SYSTEM CRITICAL - Unable to authenticate user $user for REST request"
exit $STATE_CRITICAL
elif [[ -n $(echo $esstatus | grep -i "unauthorized") ]]; then
echo "ES SYSTEM CRITICAL - User $user is unauthorized"
exit $STATE_CRITICAL
fi
fi
if ! [[ $include = "_all" ]]; then
tpsgrep=$(echo "$include" | sed "s/ /|/g")
threadpools=$(echo "$threadpools" | egrep -i "(${tpsgrep})")
if [[ $(echo ${threadpools[*]}) = "" ]]; then
echo "Thread Pool check is critical: No thread pools found with given name(s): ${include}."
exit $STATE_CRITICAL
fi
fi
tpname=($(echo "$threadpools" | awk '{print $1"-"$2}' | sed "s/\n//g"))
tpactive=($(echo "$threadpools" | awk '{print $3}' | sed "s/\n//g"))
tpqueue=($(echo "$threadpools" | awk '{print $4}' | sed "s/\n//g"))
tprejected=($(echo "$threadpools" | awk '{print $5}' | sed "s/\n//g"))
if [ -n "${warning}" ] || [ -n "${critical}" ]; then
# Handle thresholds. They have to come in a special format: n,n,n (active, queue, rejected)
thresholdlogic
wactive=$(echo ${warning} | awk -F',' '{print $1}')
wqueue=$(echo ${warning} | awk -F',' '{print $2}')
wrejected=$(echo ${warning} | awk -F',' '{print $3}')
cactive=$(echo ${critical} | awk -F',' '{print $1}')
cqueue=$(echo ${critical} | awk -F',' '{print $2}')
crejected=$(echo ${critical} | awk -F',' '{print $3}')
i=0; for tp in ${tpname[*]}; do
perfdata[$i]="tp_${tp}_active=${tpactive[$i]};${wactive};${cactive};; tp_${tp}_queue=${tpqueue[$i]};${wqueue};${cqueue};; tp_${tp}_rejected=${tprejected[$i]};${wrejected};${crejected};; "
let i++
done
i=0
for tpa in $(echo ${tpactive[*]}); do
if [[ $tpa -ge $cactive ]]; then
echo "Thread Pool ${tpname[$i]} is critical: Active ($tpa) is equal or higher than threshold ($cactive)|${perfdata[*]}"
exit $STATE_CRITICAL
elif [[ $tpa -ge $wactive ]]; then
echo "Thread Pool ${tpname[$i]} is warning: Active ($tpa) is equal or higher than threshold ($wactive)|${perfdata[*]}"
exit $STATE_WARNING
fi
let i++
done
i=0
for tpq in $(echo ${tpqueue[*]}); do
if [[ $tpq -ge $cqueue ]]; then
echo "Thread Pool ${tpname[$i]} is critical: Queue ($tpq) is equal or higher than threshold ($cqueue)|${perfdata[*]}"
exit $STATE_CRITICAL
elif [[ $tpq -ge $wqueue ]]; then
echo "Thread Pool ${tpname[$i]} is warning: Queue ($tpq) is equal or higher than threshold ($wqueue)|${perfdata[*]}"
exit $STATE_WARNING
fi
let i++
done
i=0
for tpr in $(echo ${tprejected[*]}); do
if [[ $tpr -ge $crejected ]]; then
echo "Thread Pool ${tpname[$i]} is critical: Rejected ($tpr) is equal or higher than threshold ($crejected)|${perfdata[*]}"
exit $STATE_CRITICAL
elif [[ $tpr -ge $wrejected ]]; then
echo "Thread Pool ${tpname[$i]} is warning: Rejected ($tpr) is equal or higher than threshold ($wrejected)|${perfdata[*]}"
exit $STATE_WARNING
fi
let i++
done
echo "ES SYSTEM OK - Found ${#tpname[*]} thread pools in cluster|${perfdata[*]}"
exit $STATE_OK
fi
# No Thresholds
i=0; for tp in ${tpname[*]}; do
perfdata[$i]="tp_${tp}_active=${tpactive[$i]};;;; tp_${tp}_queue=${tpqueue[$i]};;;; tp_${tp}_rejected=${tprejected[$i]};;;; "
let i++
done
echo "ES SYSTEM OK - Found ${#tpname[*]} thread pools in cluster|${perfdata[*]}"
exit $STATE_OK
;;
master) # Check Cluster Master
getstatus
if [[ -z $user ]]; then
# Without authentication
master=$(curl -k -s --max-time ${max_time} ${httpscheme}://${host}:${port}/_cat/master)
masterrc=$?
if [[ $masterrc -eq 7 ]]; then
echo "ES SYSTEM CRITICAL - Failed to connect to ${host} port ${port}: Connection refused"
exit $STATE_CRITICAL
elif [[ $masterrc -eq 28 ]]; then
echo "ES SYSTEM CRITICAL - server did not respond within ${max_time} seconds"
exit $STATE_CRITICAL
fi
fi
if [[ -n $user ]] || [[ -n $(echo $esstatus | grep -i authentication) ]] ; then
# Authentication required
authlogic
master=$(curl -k -s --max-time ${max_time} --basic -u ${user}:${pass} ${httpscheme}://${host}:${port}/_cat/master)
masterrc=$?
if [[ $threadpoolrc -eq 7 ]]; then
echo "ES SYSTEM CRITICAL - Failed to connect to ${host} port ${port}: Connection refused"
exit $STATE_CRITICAL
elif [[ $threadpoolrc -eq 28 ]]; then
echo "ES SYSTEM CRITICAL - server did not respond within ${max_time} seconds"
exit $STATE_CRITICAL
elif [[ -n $(echo $esstatus | grep -i "unable to authenticate") ]]; then
echo "ES SYSTEM CRITICAL - Unable to authenticate user $user for REST request"
exit $STATE_CRITICAL
elif [[ -n $(echo $esstatus | grep -i "unauthorized") ]]; then
echo "ES SYSTEM CRITICAL - User $user is unauthorized"
exit $STATE_CRITICAL
fi
fi
masternode=$(echo "$master" | awk '{print $NF}')
if [[ -n ${expect_master} ]]; then
if [[ "${expect_master}" = "${masternode}" ]]; then
echo "ES SYSTEM OK - Master node is $masternode"
exit $STATE_OK
else
echo "ES SYSTEM WARNING - Master node is $masternode but expected ${expect_master}"
exit $STATE_WARNING
fi
else
echo "ES SYSTEM OK - Master node is $masternode"
exit $STATE_OK
fi
;;
*) help
esac

View file

@ -0,0 +1,27 @@
#!/bin/bash
echo "Test Elasticsearch status"
./check_es_system.sh -H 127.0.0.1 -P 9200 -t readonly
if [[ $? -eq 0 ]]; then
echo -e "\e[1m\e[32m✔ Test 2.1 OK: Readonly check worked and no read_only indexes were found\e[0m"
exitcode=0
else
echo -e "\e[1m\e[31m✘ Test 2.1 ERROR: Readonly check has not worked or read_only indexes were found\e[0m"
exitcode=1
fi
# Create an index with read_only setting
curl -X PUT "127.0.0.1:9200/my-index-002" -H 'Content-Type: application/json' -d'{ "settings": { "index": { "blocks.read_only": true } } }'
sleep 5
./check_es_system.sh -H 127.0.0.1 -P 9200 -t readonly
if [[ $? -eq 2 ]]; then
echo -e "\e[1m\e[32m✔ Test 2.1 OK: Readonly check worked and detected a read only index\e[0m"
exitcode=0
else
echo -e "\e[1m\e[31m✘ Test 2.1 ERROR: Readonly check has not worked as expected\e[0m"
exitcode=1
fi
exit $exitcode

View file

@ -0,0 +1,27 @@
#!/bin/bash
echo "Test Elasticsearch status"
./check_es_system.sh -H 127.0.0.1 -P 9200 -t status
if [[ $? -eq 0 ]]; then
echo -e "\e[1m\e[32m✔ Test 1.1 OK: Status check worked and shows green\e[0m"
exitcode=0
else
echo -e "\e[1m\e[31m✘ Test 1.1 ERROR: Status check has not worked\e[0m"
exitcode=1
fi
# Create index with a replica, this should result in unassigned shards and yellow status
curl -X PUT "127.0.0.1:9200/my-index-001" -H 'Content-Type: application/json' -d'{ "settings": { "index": { "number_of_shards": 2, "number_of_replicas": 1 } } }'
sleep 5
./check_es_system.sh -H 127.0.0.1 -P 9200 -t status
if [[ $? -eq 1 ]]; then
echo -e "\e[1m\e[32m✔ Test 1.2 OK: Status check worked and shows yellow\e[0m"
exitcode=0
else
echo -e "\e[1m\e[31m✘ Test 1.2 ERROR: Status check has not worked as expected\e[0m"
exitcode=1
fi
exit $exitcode

6
check_es_system/control Normal file
View file

@ -0,0 +1,6 @@
Uploaders: Jan Wagner <waja@cyconet.org>
Recommends: curl, jshon | jq
Version: 1.12.0
Homepage: https://github.com/Napsty/check_es_system/
Watch: https://github.com/Napsty/check_es_system/tags .*/v?(\d\S+)\.tar\.gz
Description: Plugin script to check the status of an ElasticSearch cluster node.

View file

@ -1,6 +1,6 @@
Copyright (c) 2008 ml@nicole-haehnel.de
Copyright (c) Claudio Kuenzler <ck@claudiokuenzler.com>
License: N/A
License: GPL v2
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

1
check_es_system/src Symbolic link
View file

@ -0,0 +1 @@
check_es_system-1.12.0/

View file

@ -0,0 +1,14 @@
PLUGIN := check_esxi_hardware
CLEANFILES := check_esxi_hardware
DOCFILES := README.md
include ../common.mk
check_esxi_hardware:
cp $@.py $@
chmod 755 $@
install::
install -d $(DESTDIR)$(PLUGINDIR)
ln -s $(PLUGINDIR)/$(PLUGIN) $(DESTDIR)$(PLUGINDIR)/$(PLUGIN).py

View file

@ -0,0 +1,11 @@
check_esxi_hardware
=========
Monitoring plugin to check the hardware on VMware ESX/ESXi servers.
This is the public git repository for development of the plugin.
Documentation + Production Ready Plugin
-------------
Please refer to https://www.claudiokuenzler.com/monitoring-plugins/check_esxi_hardware.php

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,6 @@
Uploaders: Jan Wagner <waja@cyconet.org>
Recommends: python3-minimal, python-pywbem
Version: 20210809
Homepage: https://github.com/Napsty/check_esxi_hardware
Watch: https://github.com/Napsty/check_esxi_hardware/tags .*/v?(\d\S+)\.tar\.gz
Description: Plugin for checking global health of VMware ESX/ESXi host

View file

@ -0,0 +1,12 @@
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, see <https://www.gnu.org/licenses/>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,5 @@
Homepage: https://exchange.nagios.org/directory/Plugins/Network-Connections%2C-Stats-and-Bandwidth/check_iftraffic64/details
Uploaders: Jan Wagner <waja@cyconet.org>
Description: plugin for checking network traffic by snmp.
Recommends: libsnmp-perl, libnet-dns-perl
Version: .77

View file

@ -0,0 +1,7 @@
Copyright (C) 2004 Gerd Mueller / Netways GmbH
License: GPL+
On Debian systems, the complete text of the GNU General
Public License can be found in "/usr/share/common-licenses/GPL".

3
check_iostat/Makefile Normal file
View file

@ -0,0 +1,3 @@
#/usr/bin/make -f
include ../common.mk

352
check_iostat/check_iostat Normal file
View file

@ -0,0 +1,352 @@
#!/bin/bash
#----------check_iostat.sh-----------
#
# Version 0.0.2 - Jan/2009
# Changes: added device verification
#
# by Thiago Varela - thiago@iplenix.com
#
# Version 0.0.3 - Dec/2011
# Changes:
# - changed values from bytes to mbytes
# - fixed bug to get traffic data without comma but point
# - current values are displayed now, not average values (first run of iostat)
#
# by Philipp Niedziela - pn@pn-it.com
#
# Version 0.0.4 - April/2014
# Changes:
# - Allow Empty warn/crit levels
# - Can check I/O, WAIT Time, or Queue
#
# by Warren Turner
#
# Version 0.0.5 - Jun/2014
# Changes:
# - removed -y flag from call since iostat doesn't know about it any more (June 2014)
# - only needed executions of iostat are done now (save cpu time whenever you can)
# - fixed the obvious problems of missing input values (probably because of the now unimplemented "-y") with -x values
# - made perfomance data optional (I like to have choice in the matter)
#
# by Frederic Krueger / fkrueger-dev-checkiostat@holics.at
#
# Version 0.0.6 - Jul/2014
# Changes:
# - Cleaned up argument checking, removed excess iostat calls, steamlined if statements and renamed variables to fit current use
# - Fixed all inputs to match current iostat output (Ubuntu 12.04)
# - Changed to take last ten seconds as default (more useful for nagios usage). Will go to "since last reboot" (previous behaviour) on -g flag.
# - added extra comments/whitespace etc to make add readability
#
# by Ben Field / ben.field@concreteplatform.com
#
# Version 0.0.7 - Sep/2014
# Changes:
# - Fixed performance data for Wait check
#
# by Christian Westergard / christian.westergard@gmail.com
#
# Version 0.0.8 - Jan/2019
# Changes:
# - Added Warn/Crit thresholds to performance output
#
# by Danny van Zunderd / danny_vz@live.nl
#
# Version 0.0.9 - Jun/2020
# Changes:
# - Updated to use bash 4.4 mechanisms
#
# by Joseph Waggy / joseph.waggy@gmail.com
iostat=$(which iostat 2>/dev/null)
bc=$(which bc 2>/dev/null)
help()
{
echo -e "
Usage:
-d =
--Device to be checked. Example: \"-d sda\"
Run only one of i, q, W:
-i = IO Check Mode
--Checks Total Transfers/sec, Read IO/Sec, Write IO/Sec, Bytes Read/Sec, Bytes Written/Sec
--warning/critical = Total Transfers/sec,Read IO/Sec,Write IO/Sec,Bytes Read/Sec,Bytes Written/Sec
-q = Queue Mode
--Checks Disk Queue Lengths
--warning/critial = Average size of requests, Queue length of requests
-W = Wait Time Mode
--Check the time for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.
--warning/critical = Avg I/O Wait Time (ms), Avg Read Wait Time (ms), Avg Write Wait Time (ms), Avg Service Wait Time (ms), Avg CPU Utilization
-w,-c = pass warning and critical levels respectively. These are not required, but with out them, all queries will return as OK.
-p = Provide performance data for later graphing
-g = Since last reboot for system (more for debugging that nagios use!)
-h = This help
"
}
# Ensuring we have the needed tools:
if [[ ! -f $iostat ]] || [[ ! -f $bc ]]; then
echo -e "ERROR: You must have iostat and bc installed in order to run this plugin\n\tuse: apt-get install systat bc\n"
exit -1
fi
io=0
queue=0
waittime=0
printperfdata=0
STATE="OK"
samples=2i
status=0
MSG=""
PERFDATA=""
#------------Argument Set-------------
while getopts "d:w:c:ipqWhg" OPT; do
case $OPT in
"d")
disk=$OPTARG
;;
"w")
warning=$OPTARG
;;
"c")
critical=$OPTARG
;;
"i")
io=1
;;
"p")
printperfdata=1
;;
"q")
queue=1
;;
"W")
waittime=1
;;
"g")
samples=1
;;
"h")
echo "help:"
help
exit 0
;;
\?)
echo "Invalid option: -$OPTARG" >&2
help
exit -1
;;
esac
done
# Autofill if parameters are empty
if [[ -z "$disk" ]]; then
disk=sda
fi
#Checks that only one query type is run
if [[ $((io+queue+waittime)) -ne "1" ]]; then
echo "ERROR: select one and only one run mode"
help
exit -1
fi
#set warning and critical to insane value is empty, else set the individual values
if [[ -z "$warning" ]]; then
warning=99999
else
#TPS with IO, Request size with queue
warn_1=$(echo $warning | cut -d, -f1)
#Read/s with IO,Queue Length with queue
warn_2=$(echo $warning | cut -d, -f2)
#Write/s with IO
warn_3=$(echo $warning | cut -d, -f3)
#KB/s read with IO
warn_4=$(echo $warning | cut -d, -f4)
#KB/s written with IO
warn_5=$(echo $warning | cut -d, -f5)
#Crude hack due to integer expression later in the script
warning=1
fi
if [[ -z "$critical" ]]; then
critical=99999
else
#TPS with IO, Request size with queue
crit_1=$(echo $critical | cut -d, -f1)
#Read/s with IO,Queue Length with queue
crit_2=$(echo $critical | cut -d, -f2)
#Write/s with IO
crit_3=$(echo $critical | cut -d, -f3)
#KB/s read with IO
crit_4=$(echo $critical | cut -d, -f4)
#KB/s written with IO
crit_5=$(echo $critical | cut -d, -f5)
#Crude hack due to integer expression later in the script
critical=1
fi
#------------Argument Set End-------------
#------------Parameter Check-------------
#Checks for sane Disk name:
if [[ ! -b "/dev/$disk" ]]; then
echo "ERROR: Device incorrectly specified"
help
exit -1
fi
#Checks for sane warning/critical levels
if [[ $warning -ne "99999" || $critical -ne "99999" ]]; then
if [[ "$warn_1" -gt "$crit_1" || "$warn_2" -gt "$crit_2" ]]; then
echo "ERROR: critical levels must be higher than warning levels"
help
exit -1
elif [[ $io -eq "1" || $waittime -eq "1" ]]; then
if [[ "$warn_3" -gt "$crit_3" || "$warn_4" -gt "$crit_4" || "$warn_5" -gt "$crit_5" ]]; then
echo "ERROR: critical levels must be higher than warning levels"
help
exit -1
fi
fi
fi
#------------Parameter Check End-------------
# iostat parameters:
# -m: megabytes
# -k: kilobytes
# first run of iostat shows statistics since last reboot, second one shows current vaules of hdd
# -d is the duration for second run, -x the rest
TMPX=$($iostat $disk -x -k -d 10 $samples | grep $disk | tail -1)
#------------IO Test-------------
if [[ "$io" == "1" ]]; then
TMPD=$($iostat $disk -k -d 10 $samples | grep $disk | tail -1)
#Requests per second:
tps=$(echo "$TMPD" | awk '{print $2}')
read_sec=$(echo "$TMPX" | awk '{print $4}')
written_sec=$(echo "$TMPX" | awk '{print $5}')
#Kb per second:
kbytes_read_sec=$(echo "$TMPX" | awk '{print $6}')
kbytes_written_sec=$(echo "$TMPX" | awk '{print $7}')
# "Converting" values to float (string replace , with .)
tps=${tps/,/.}
read_sec=${read_sec/,/.}
written_sec=${written_sec/,/.}
kbytes_read_sec=${kbytes_read_sec/,/.}
kbytes_written_sec=${kbytes_written_sec/,/.}
# Comparing the result and setting the correct level:
if [[ "$warning" -ne "99999" ]]; then
if [[ "$(echo "$tps >= $warn_1" | bc)" == "1" || "$(echo "$read_sec >= $warn_2" | bc)" == "1" || "$(echo "$written_sec >= $warn_3" | bc)" == "1" || "$(echo "$kbytes_read_sec >= $warn_4" | bc -q)" == "1" || "$(echo "$kbytes_written_sec >= $warn_5" | bc)" == "1" ]]; then
STATE="WARNING"
status=1
fi
fi
if [[ "$critical" -ne "99999" ]]; then
if [[ "$(echo "$tps >= $crit_1" | bc)" == "1" || "$(echo "$read_sec >= $crit_2" | bc -q)" == "1" || "$(echo "$written_sec >= $crit_3" | bc)" == "1" || "$(echo "$kbytes_read_sec >= $crit_4" | bc -q)" == "1" || "$(echo "$kbytes_written_sec >= $crit_5" | bc)" == "1" ]]; then
STATE="CRITICAL"
status=2
fi
fi
# Printing the results:
MSG="$STATE - I/O stats: Transfers/Sec=$tps Read Requests/Sec=$read_sec Write Requests/Sec=$written_sec KBytes Read/Sec=$kbytes_read_sec KBytes_Written/Sec=$kbytes_written_sec"
PERFDATA=" | total_io_sec'=$tps;$warn_1;$crit_1; read_io_sec=$read_sec;$warn_2;$crit_2; write_io_sec=$written_sec;$warn_3;$crit_3; kbytes_read_sec=$kbytes_read_sec;$warn_4;$crit_4; kbytes_written_sec=$kbytes_written_sec;$warn_5;$crit_5;"
fi
#------------IO Test End-------------
#------------Queue Test-------------
if [[ "$queue" == "1" ]]; then
qsize=$(echo "$TMPX" | awk '{print $8}')
qlength=$(echo "$TMPX" | awk '{print $9}')
# "Converting" values to float (string replace , with .)
qsize=${qsize/,/.}
qlength=${qlength/,/.}
# Comparing the result and setting the correct level:
if [[ "$warning" -ne "99999" ]]; then
if [[ "$(echo "$qsize >= $warn_1" | bc)" == "1" || "$(echo "$qlength >= $warn_2" | bc)" == "1" ]]; then
STATE="WARNING"
status=1
fi
fi
if [[ "$critical" -ne "99999" ]]; then
if [[ "$(echo "$qsize >= $crit_1" | bc)" == "1" || "$(echo "$qlength >= $crit_2" | bc)" == "1" ]]; then
STATE="CRITICAL"
status=2
fi
fi
# Printing the results:
MSG="$STATE - Disk Queue Stats: Average Request Size=$qsize Average Queue Length=$qlength"
PERFDATA=" | qsize=$qsize;$warn_1;$crit_1; queue_length=$qlength;$warn_2;$crit_2;"
fi
#------------Queue Test End-------------
#------------Wait Time Test-------------
#Parse values. Warning - svc time will soon be deprecated and these will need to be changed. Future parser could look at first line (labels) to suggest correct column to return
if [[ "$waittime" == "1" ]]; then
avgwait=$(echo "$TMPX" | awk '{print $10}')
avgrwait=$(echo "$TMPX" | awk '{print $11}')
avgwwait=$(echo "$TMPX" | awk '{print $12}')
avgsvctime=$(echo "$TMPX" | awk '{print $13}')
avgcpuutil=$(echo "$TMPX" | awk '{print $14}')
# "Converting" values to float (string replace , with .)
avgwait=${avgwait/,/.}
avgrwait=${avgrwait/,/.}
avgwwait=${avgwwait/,/.}
avgsvctime=${avgsvctime/,/.}
avgcpuutil=${avgcpuutil/,/.}
# Comparing the result and setting the correct level:
if [[ "$warning" -ne "99999" ]]; then
if [[ "$(echo "$avgwait >= $warn_1" | bc)" == "1" || "$(echo "$avgrwait >= $warn_2" | bc -q)" == "1" || "$(echo "$avgwwait >= $warn_3" | bc)" == "1" || "$(echo "$avgsvctime >= $warn_4" | bc -q)" == "1" || "$(echo "$avgcpuutil >= $warn_5" | bc)" == "1" ]]; then
STATE="WARNING"
status=1
fi
fi
if [[ "$critical" -ne "99999" ]]; then
if [[ "$(echo "$avgwait >= $crit_1" | bc)" == "1" || "$(echo "$avgrwait >= $crit_2" | bc -q)" == "1" || "$(echo "$avgwwait >= $crit_3" | bc)" == "1" || "$(echo "$avgsvctime >= $crit_4" | bc -q)" == "1" || "$(echo "$avgcpuutil >= $crit_5" | bc)" == "1" ]]; then
STATE="CRITICAL"
status=2
fi
fi
# Printing the results:
MSG="$STATE - Wait Time Stats: Avg I/O Wait Time (ms)=$avgwait Avg Read Wait Time (ms)=$avgrwait Avg Write Wait Time (ms)=$avgwwait Avg Service Wait Time (ms)=$avgsvctime Avg CPU Utilization=$avgcpuutil"
PERFDATA=" | avg_io_waittime_ms=$avgwait;$warn_1;$crit_1; avg_r_waittime_ms=$avgrwait;$warn_2;$crit_2; avg_w_waittime_ms=$avgwwait;$warn_3;$crit_3; avg_service_waittime_ms=$avgsvctime;$warn_4;$crit_4; avg_cpu_utilization=$avgcpuutil;$warn_5;$crit_5;"
fi
#------------Wait Time End-------------
# now output the official result
echo -n "$MSG"
if [[ "x$printperfdata" == "x1" ]]; then
echo -n "$PERFDATA"
fi
echo ""
exit $status
#----------/check_iostat.sh-----------

5
check_iostat/control Normal file
View file

@ -0,0 +1,5 @@
Homepage: https://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_iostat--2D-I-2FO-statistics/details
Uploaders: Jan Wagner <waja@cyconet.org>
Description: plugin shows the I/O usage of the specified disk.
Recommends: sysstat, bc
Version: 0.0.9

1
check_iostat/copyright Normal file
View file

@ -0,0 +1 @@

3
check_iostats/Makefile Normal file
View file

@ -0,0 +1,3 @@
#/usr/bin/make -f
include ../common.mk

150
check_iostats/check_iostats Normal file
View file

@ -0,0 +1,150 @@
#!/usr/bin/perl
#
# Version 0.0.2 - Jan/2009
# Changes: added device verification
#
# by Thiago Varela - thiago@iplenix.com
# Version 0.1 - Nov/2011
# by Ruediger Oertel ro@suse.de
# Changes:
# - rewrite in perl, no need for external grep, awk, bc
# - add output for iowait
# - implement using device mapper names, e.g. $vg-$lv
use strict;
use Getopt::Std;
$Getopt::Std::STANDARD_HELP_VERSION = "true";
my $iostat = `which iostat 2>/dev/null`;
chomp($iostat);
my $progname = $0;
# call it VERSION_MESSAGE so that getopts uses it automatically
sub VERSION_MESSAGE {
print "$progname: version 0.1, Nov/2011\n";
}
# call it HELP_MESSAGE so that getopts uses it automatically
sub HELP_MESSAGE {
print "\n\tThis plugin shows the I/O usage of the specified disk, using the iostat external program.\n";
print "\tIt prints three statistics: Transactions per second (tps), Kilobytes per second\n";
print "tread from the disk (KB_read/s) and and written to the disk (KB_written/s)\n\n";
print "$progname:\n\t-d <disk>\t\tDevice to be checked (without the full path, eg. sda)\n";
print "\t\t\t\t(also accepted are device mapper names)\n";
print "\t-c <tps>,<read>,<wrtn>\tSets the CRITICAL level for tps, KB_read/s and KB_written/s, respectively\n";
print "\t-w <tps>,<read>,<wrtn>\tSets the WARNING level for tps, KB_read/s and KB_written/s, respectively\n";
print "\t-C <percent>\t Sets the CRITICAL level for iowait\n";
print "\t-W <percent>\t Sets the WARNING level for iowait\n";
print "\t\t\t(if no level is set for iowait, no warning is set for this value)\n";
exit 1;
}
unless ($iostat && -f $iostat) {
warn "ERROR: You must have iostat installed in order to run this plugin\n";
exit 1;
}
# Getting parameters:
my %opts;
getopts('d:w:c:W:C:hv', \%opts);
my $disk = $opts{'d'};
my $warning = $opts{'w'};
my $critical = $opts{'c'};
my $warning_iowait = $opts{'W'};
my $critical_iowait = $opts{'C'};
VERSION_MESSAGE() if $opts{'v'};
HELP_MESSAGE() if $opts{'h'};
# Adjusting the three warn and crit levels:
my ($crit_tps,$crit_read,$crit_written) = split(',',$critical);
my ($warn_tps,$warn_read,$warn_written) = split(',',$warning);
# Checking parameters:
if (! -b "/dev/$disk") {
if (-b "/dev/mapper/$disk") {
my @f = stat("/dev/mapper/$disk");
$f[6] %= 256;
$disk = "dm-$f[6]";
} else {
warn "ERROR: Device incorrectly specified\n";
HELP_MESSAGE();
}
}
unless ($warn_tps && $warn_read && $warn_written && $crit_tps && $crit_read && $crit_written) {
warn "ERROR: You must specify all warning and critical levels\n";
HELP_MESSAGE();
}
if ($warn_tps > $crit_tps || $warn_read > $crit_read || $warn_written > $crit_written) {
warn "ERROR: critical levels must be highter than warning levels\n";
HELP_MESSAGE();
}
if ($warning_iowait && $critical_iowait && $warning_iowait > $critical_iowait) {
warn "ERROR: critical iowait level must be higher that warning level\n";
HELP_MESSAGE();
}
my ($tps,$kbread,$kbwritten,$iowait);
my $seen_usage = 0;
my $seen_disk = 0;
# Doing the actual check:
open (IOSTAT,"-|","$iostat -k $disk 2 2");
while (<IOSTAT>) {
chomp();
if (/^[0-9\.\ \t]+$/) {
$seen_usage++;
next if $seen_usage < 2;
my (@stats) = split ('\s+', $_);
$iowait = $stats[4];
next;
}
if (/^$disk /) {
$seen_disk++;
next if $seen_disk < 2;
my (@stats) = split ('\s+', $_);
($tps,$kbread,$kbwritten) = @stats[1,2,3];
last;
}
}
close (IOSTAT);
my $msg = "OK";
my $status = 0;
# Comparing the result and setting the correct level:
if ($tps >= $warn_tps || $kbread >= $warn_read || $kbwritten >= $warn_written) {
$msg = "WARNING";
$status = 1;
}
if ($warning_iowait && $iowait >= $warning_iowait) {
$msg = "WARNING";
$status = 1;
}
if ($tps >= $crit_tps || $kbread >= $crit_read || $kbwritten >= $crit_written) {
$msg = "CRITICAL";
$status = 2;
}
if ($critical_iowait && $iowait >= $critical_iowait) {
$msg = "CRITICAL";
$status = 2;
}
# Printing the results:
print "$msg - I/O stats tps=$tps KB_read/s=$kbread KB_written/s=$kbwritten iowait=$iowait | 'tps'=$tps; 'KB_read/s'=$kbread; 'KB_written/s'=$kbwritten; 'iowait'=$iowait\n";
# Bye!
exit $status;

6
check_iostats/control Normal file
View file

@ -0,0 +1,6 @@
Homepage: https://github.com/dnsmichi/icinga-plugins/blob/master/scripts/check_iostats
Watch: https://gitlab.icare.ch/open-source/monitoring-plugins/-/raw/master/check_iostats # Version ([0-9.]+)
Uploaders: Jan Wagner <waja@cyconet.org>
Description: plugin shows the I/O usage of the specified disk, perl implementation.
Recommends: sysstat
Version: 0.1

1
check_iostats/copyright Normal file
View file

@ -0,0 +1 @@

View file

@ -1,194 +0,0 @@
#!/bin/bash
# Written By Nicole
# Any Comments or Questions please e-mail to ml@nicole-haehnel.de
#
# Plugin Name: check_ipsec
# Version: 2.0
# Date: 26/08/2008
#
# Usage: check_ipsec --tunnels <n>
#
# gateways.txt file must be located in same directory
# and has to look like:
# nameofconn1 192.168.0.1
# nameofconn2 192.168.1.1
#
# ------------Defining Variables------------
PROGNAME=`basename $0`
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
REVISION=`echo '$Revision: 2.0 $' | sed -e 's/[^0-9.]//g'`
#STRONG=`$IPSECBIN --version |grep strongSwan | wc -l`
DOWN=""
# ---------- Change to your needs ----------
PLUGINPATH="/usr/lib64/nagios/plugins"
GATEWAYLIST="gateways.txt"
IPSECBIN="/usr/sbin/ipsec"
FPINGBIN="/usr/sbin/fping"
# ping server in network on the other side of the tunnel
PINGIP=1 # ping yes or no (1/0)
# ------------------------------------------
. $PROGPATH/utils.sh
# Testing availability of $IPSECBIN, $FPINGBIN and $GATEWAYLIST
if [ $# -eq 0 ];
then
echo UNKNOWN - missing Arguments. Run check_ipsec --help
exit $STATE_UNKNOWN
fi
test -e $IPSECBIN
if [ $? -ne 0 ];
then
echo CRITICAL - $IPSECBIN not exist
exit $STATE_CRITICAL
else
STRONG=`$IPSECBIN --version |grep strongSwan | wc -l`
fi
if [ $PINGIP -eq 1 ]
then
test -e $FPINGBIN
if [ $? -ne 0 ];
then
echo CRITICAL - $FPINGBIN not exist
exit $STATE_CRITICAL
fi
fi
test -e $PROGPATH/$GATEWAYLIST
if [ $? -ne 0 ];
then
echo CRITICAL - $GATEWAYLIST not exist
exit $STATE_CRITICAL
fi
print_usage() {
echo "Usage:"
echo " $PROGNAME --tunnels <number of configured tunnels>"
echo " $PROGNAME --help"
echo " $PROGNAME --version"
echo " Created by Nicole, questions or problems e-mail ml@nicole-haehnel.de"
echo ""
}
print_help() {
print_revision $PROGNAME $REVISION
echo ""
print_usage
echo " Checks vpn connection status of an openswan or strongswan installation."
echo ""
echo " --tunnels <number of configured tunnels>"
echo " -T <number of configured tunnels>"
echo " provides the tunnel status of the openswan or strongswan installation"
echo ""
echo " --help"
echo " -h"
echo " prints this help screen"
echo ""
echo " --version"
echo " -V"
echo " Print version and license information"
echo ""
}
check_tunnel() {
if [[ "$STRONG" -eq "1" ]]
then
eroutes=`$IPSECBIN status | grep -e "IPsec SA established" | grep -e "newest IPSEC" | wc -l`
else
eroutes=`$IPSECBIN whack --status | grep -e "IPsec SA established" | grep -e "newest IPSEC" | wc -l`
fi
if [[ "$eroutes" -eq "$2" ]]
then
echo "OK - All $2 tunnels are up an running"
exit $STATE_OK
elif [[ "$eroutes" -gt "$2" ]]
then
echo "WARNING - More than $2 ($eroutes) tunnels are up an running"
exit $STATE_WARNING
else
echo "CRITICAL - Only $eroutes tunnels from $2 are up an running - $(location)"
exit $STATE_CRITICAL
fi
}
location() {
count=0
i=1
while read line; do
CONN=`echo $line| awk '{print $1}'`
IP=`echo $line| awk '{print $2}'`
if [[ "$STRONG" -eq "1" ]]
then
tunneltest=`$IPSECBIN status | grep -e "IPsec SA established" | grep -e "newest IPSEC" |grep -e $CONN | wc -l`
else
tunneltest=`$IPSECBIN whack --status | grep -e "IPsec SA established" | grep -e "newest IPSEC" |grep -e "$CONN" | wc -l`
fi
if [[ "$tunneltest" -eq "0" ]]
then
count=$[$count+1]
DOWN="$DOWN $CONN"
fi
if [[ "$PINGIP" -eq "1" && "$tunneltest" -eq "1" ]]
then
alive=`$FPINGBIN $IP -r 1 | grep alive | wc -l`
if [[ "$alive" -eq "0" ]]
then
count=$[$count+1]
DOWN="$DOWN $CONN (no ping)"
fi
fi
i=$[$i+1]
done < $PLUGINPATH/$GATEWAYLIST
echo $DOWN
}
case "$1" in
--help)
print_help
exit $STATE_OK
;;
-h)
print_help
exit $STATE_OK
;;
--version)
print_revision $PLUGIN $REVISION
exit $STATE_OK
;;
-V)
print_revision $PLUGIN $REVISION
exit $STATE_OK
;;
--tunnels)
check_tunnel $1 $2
;;
-T)
check_tunnel $1 $2
;;
*)
print_help
exit $STATE_OK
esac

View file

@ -1,6 +0,0 @@
Homepage: https://raw.githubusercontent.com/Inuits/monitoring-plugins/master/check_ipsec
Watch: https://raw.githubusercontent.com/Inuits/monitoring-plugins/master/check_ipsec # Version: ([0-9.]+)
Recommends: monitoring-plugins-common | nagios-plugins-common, fping, strongswan-starter | openswan
Version: 2.0
Uploaders: Jan Wagner <waja@cyconet.org>
Description: plugin checking ipsec connections from open- or stongswan

View file

@ -0,0 +1,3 @@
#/usr/bin/make -f
include ../common.mk

View file

@ -0,0 +1,254 @@
#!/bin/bash
# Monitoring plugin to check the keepalived status
usage(){
echo "Check: Is the keepalived service operate as it should.
--status | -s <state> ) Target state of the system (MASTER, BACKUP)
--interface | -i <interface> ) Interface for vrrp instance
--ha-ip | -ip <ip> ) Vrrp-ip
--interface2 | -i2 <interface> ) Interface for 2nd vrrp instance
--ha-ip2 | -ip2 <ip> ) 2nd vrrp-ip
--help | -h ) Usage
"
}
# Exit Codes
OK=0
WARNING=1
CRITICAL=2
UNKNOWN=3
# Command definitions
if [ -x "$(which cat)" ];
then
CAT="$(which cat)"
fi
if [ -x "$(which grep)" ];
then
GREP="$(which grep)"
fi
if [ -x "$(which ip)" ];
then
IP="$(which ip)"
fi
if [ -x "$(which pgrep)" ];
then
PG="$(which pgrep)"
fi
if [ -x "$(which wc)" ];
then
WC="$(which wc)"
fi
if [ "$1" = "" ]
then
echo "CRITICAL: No arguments given. Take a look at the usage:"
usage
exit "${CRITICAL}"
fi
# shifting through our command line arguments and setting our values
while [ "$1" != "" ]; do
case $1 in
--status | -s ) shift
TARGET_STATE="$1"
;;
--interface | -i ) shift
IFACE="$1"
;;
--ha-ip | -ip ) shift
HAIP="$1"
;;
--interface2 | -i2 ) shift
IFACE2="$1"
SEC_IP=true
;;
--ha-ip2 | -ip2 ) shift
HAIP2="$1"
;;
--help | -h ) usage
exit
;;
* ) usage
echo "CRITICAL: No valid arguments given. Take a look at the usage."
exit "${CRITICAL}"
esac
shift
done
# Config and commands
STAT_FILE='/tmp/keepalived.status'
PID_FILE='/run/keepalived.pid'
PID=$("${CAT}" "${PID_FILE}" 2>/dev/null)
SERVICE=$("${PG}" keepalived)
STATUS=(MASTER BACKUP FAULT)
CHECK_HAIP=$("${IP}" 2>/dev/null addr sh "${IFACE}" | "${GREP}" "${HAIP}" | "${WC}" -l)
CHECK_HAIP2=$("${IP}" 2>/dev/null addr sh "${IFACE2}" | "${GREP}" "${HAIP2}" | "${WC}" -l)
# Check files are valid
if [ ! -e "${STAT_FILE}" ]
then
echo "CRITICAL: Generated status file is missing. State could not be determined."
exit "${CRITICAL}"
fi
FILE_CONT=$("${CAT}" "${STAT_FILE}" 2>/dev/null)
if [ ! -e "${PID_FILE}" ]
then
echo "CRITICAL: PID file is missing, keepalived is not running."
exit "${CRITICAL}"
fi
# Check variables exists
if [ -z "${TARGET_STATE}" ]
then
echo "CRITICAL: Parameter 'status' not given. Check usage:"
usage
exit "${CRITICAL}"
fi
if [ -z "${IFACE}" ]
then
echo "CRITICAL: Parameter 'interface' not given. Check usage:"
usage
exit "${CRITICAL}"
fi
if [ -z "${HAIP}" ]
then
echo "CRITICAL: Parameter 'ha-ip' not given. Check usage:"
usage
exit "${CRITICAL}"
fi
# Check service is running
if [[ ! "${SERVICE}" =~ ${PID} ]]
then
echo "CRITICAL: keepalived is not running."
exit "${CRITICAL}"
fi
# Confirm valid STATUS
if [[ ! "${STATUS[*]}" =~ ${FILE_CONT} ]]
then
echo "CRITICAL: Status file contains unknown status or is empty. Take a look at ${STAT_FILE}."
exit "${CRITICAL}"
fi
# Check ha ip and status
if [ "${TARGET_STATE}" = "${STATUS[0]}" ] # Machine is defined as MASTER
then
case "${FILE_CONT}" in
MASTER ) STAT=ok
;;
BACKUP ) STAT=fail
;;
FAULT ) echo "CRITICAL: Machine status is FAULT."
exit "${CRITICAL}"
;;
* ) echo "CRITICAL: Status file contains unknown status or is empty. Take a look at ${STAT_FILE}."
exit "${CRITICAL}"
esac
if [ "${SEC_IP}" == "true" ] # 2nd ha instance
then
if [ "${CHECK_HAIP2}" == 0 ] && [ "${STAT}" == ok ]
then
echo "CRITICAL: 2nd HA IP ${HAIP2} is not up but machine is MASTER according to ${STAT_FILE}."
STAT_SEC_IP=CRIT
elif [ "${CHECK_HAIP2}" == 0 ] && [ "${STAT}" == fail ]
then
echo "CRITICAL: 2nd HA IP ${HAIP2} is not up, machine is BACKUP. Should be MASTER."
elif [ "${CHECK_HAIP2}" == 1 ] && [ "${STAT}" == fail ]
then
echo "CRITICAL: 2nd HA IP ${HAIP2} is up, but machine is BACKUP according to ${STAT_FILE}. Should be MASTER."
else
echo "OK: 2nd HA IP ${HAIP2} is up and machine is MASTER."
fi
fi
if [ "${CHECK_HAIP}" == 0 ] && [ "${STAT}" == ok ] # Target-actual comparison machine state; IP should be up
then
echo "CRITICAL: HA IP ${HAIP} is not up but machine is MASTER according to ${STAT_FILE}."
exit "${CRITICAL}"
elif [ "${CHECK_HAIP}" == 0 ] && [ "${STAT}" == fail ]
then
echo "CRITICAL: HA IP ${HAIP} is not up, machine is BACKUP. Should be MASTER."
exit "${CRITICAL}"
elif [ "${CHECK_HAIP}" == 1 ] && [ "${STAT}" == fail ]
then
echo "CRITICAL: HA IP ${HAIP} is up, but machine is BACKUP according to ${STAT_FILE}. Should be MASTER."
exit "${CRITICAL}"
else
echo "OK: HA IP ${HAIP} is up and machine is MASTER."
if [ "${STAT_SEC_IP}" == CRIT ]
then
exit "${CRITICAL}"
else
exit "${OK}"
fi
fi
elif [ "${TARGET_STATE}" = "${STATUS[1]}" ] # Machine is defined as BACKUP
then
case "${FILE_CONT}" in
MASTER ) STAT=fail
;;
BACKUP ) STAT=ok
;;
FAULT ) echo "CRITICAL: Machine status is FAULT."
exit "${CRITICAL}"
;;
* ) echo "CRITICAL: Status file contains unknown status or is empty."
exit "${CRITICAL}"
esac
if [ "${SEC_IP}" == "true" ] # 2nd ha instance
then
if [ "${CHECK_HAIP2}" == 1 ] && [ "${STAT}" == ok ]
then
echo "CRITICAL: 2nd HA IP ${HAIP2} is up but machine is BACKUP according to ${STAT_FILE}."
STAT_SEC_IP=CRIT
elif [ "${CHECK_HAIP2}" == 1 ] && [ "${STAT}" == fail ]
then
echo "WARNING: 2nd HA IP ${HAIP2} is up, machine is MASTER. Should be BACKUP."
elif [ "${CHECK_HAIP2}" == 0 ] && [ "${STAT}" == fail ]
then
echo "CRITICAL: 2nd HA IP ${HAIP2} is not up but machine is MASTER according to ${STAT_FILE}. Should be BACKUP."
else
echo "OK: 2nd HA IP ${HAIP2} is not up and machine is BACKUP."
fi
fi
if [ "${CHECK_HAIP}" == 1 ] && [ "${STAT}" == ok ] # Target-actual comparison machine state; IP should be down
then
echo "CRITICAL: HA IP ${HAIP} is up but machine is BACKUP according to ${STAT_FILE}."
exit "${CRITICAL}"
elif [ "${CHECK_HAIP}" == 1 ] && [ "${STAT}" == fail ]
then
echo "WARNING: HA IP ${HAIP} is up, machine is MASTER. Should be BACKUP."
exit "${WARNING}"
elif [ "${CHECK_HAIP}" == 0 ] && [ "${STAT}" == fail ]
then
echo "CRITICAL: HA IP ${HAIP} is not up but machine is MASTER according to ${STAT_FILE}. Should be BACKUP."
exit "${CRITICAL}"
else
echo "OK: HA IP ${HAIP} is not up and machine is BACKUP."
if [ "${STAT_SEC_IP}" == CRIT ]
then
exit "${CRITICAL}"
else
exit "${OK}"
fi
fi
else
echo "Unknown: Unknown status given. Check ${STAT_FILE} and script usage."
exit "${UNKNOWN}"
fi

4
check_keepalived/control Normal file
View file

@ -0,0 +1,4 @@
Uploaders: Jan Wagner <waja@cyconet.org>
Description: plugin checking keepalived status
Recommends: procps
Version: 0.0.1

View file

@ -0,0 +1,7 @@
Copyright (C) 2021 Stella Sieber / TMT GmbH & Co. KG
License: GPL+
On Debian systems, the complete text of the GNU General
Public License can be found in "/usr/share/common-licenses/GPL".

View file

@ -1,23 +1,29 @@
#!/usr/bin/python
###############################################################################################################
# Language : Python (3.*)
# Language : Python 3
# Filename : check_nextcloud.py
# Autor : https://github.com/BornToBeRoot
# Description : Nagios/Centreon plugin for nextcloud serverinfo API (https://github.com/nextcloud/serverinfo)
# Repository : https://github.com/BornToBeRoot/check_nextcloud
###############################################################################################################
### Changelog #################################################################################################
# ~~ Version 2.0 ~~
# - Update to Python 3.*
# - Check: Theme
# - [not implemented yet] Check: App + Updates available
# - [not implemented yet] Check: Cache/Filelocking
# - [not implemented yet] Open pull requests...
###############################################################################################################
### Changelog ###
#
# ~~ Version 1.2 ~~
# - Parameter "--ignore-sslcert" added. (Note: If you use an ip address as hostname... you need to add the ip
# address as trusted domain in the config.php)
# - Parameter "--perfdata-format" added [centreon|nagios] (default="centreon")
# ~~ Version 1.3 ~~
# - Check for app updates added (Thanks @thinkl33t)
# ~~ Version 1.4 ~~
# - Parameter "--nc-token" added (Thanks @sblatt)
# ~~ Version 2.0 ~~
# - Migrated from Python 2.7 to 3 (Thanks @waja)
#
#################
import urllib.parse, urllib.request, urllib.response, base64, xml.etree.ElementTree, sys, traceback, re
import urllib.request, urllib.error, urllib.parse, base64, xml.etree.ElementTree, sys, traceback, ssl, re
# Some helper functions
def calc_size_suffix(num, suffix='B'):
@ -41,35 +47,38 @@ def calc_size_nagios(num, suffix='B'):
# Command line parser
from optparse import OptionParser
parser = OptionParser(usage='%prog -u username -p password -H cloud.example.com -c [system|theme|storage|shares|webserver|php|database|activeUsers|uploadFilesize]')
parser = OptionParser(usage='%prog -u username -p password -H cloud.example.com -c [system|storage|shares|webserver|php|database|activeUsers|uploadFilesize|apps]')
parser.add_option('-v', '--version', dest='version', default=False, action='store_true', help='Print the version of this script')
parser.add_option('-u', '--username', dest='username', type='string', help='Username of the user with administrative permissions on the nextcloud server')
parser.add_option('-p', '--password', dest='password', type='string', help='Password of the user')
parser.add_option('-t', '--nc-token', dest='nc_token', type='string', help='Token to access the nextcloud serverinfo api. You can generate the token with "occ config:app:set serverinfo token --value yourtoken"; replaces username/password')
parser.add_option('-H', '--hostname', dest='hostname', type='string', help='Nextcloud server address (make sure that the address is a trusted domain in the config.php)')
parser.add_option('-c', '--check', dest='check', choices=['system','theme','storage','shares','webserver','php','database','activeUsers','uploadFilesize'], help='The thing you want to check [system|theme|storage|shares|webserver|php|database|activeUsers|uploadFilesize]')
parser.add_option('--upload-filesize', dest='upload_filesize', default='512.0MiB', help='Filesize in MiB, GiB without spaces (default="512.0GiB")')
parser.add_option('-c', '--check', dest='check', choices=['system','storage','shares','webserver','php','database','activeUsers','uploadFilesize','apps'], help='The thing you want to check [system|storage|shares|webserver|php|database|activeUsers|uploadFilesize|apps]')
parser.add_option('--perfdata-format', dest='perfdata_format', default='centreon', choices=['centreon','nagios'], help='Format for the performance data [centreon|nagios] (default="centreon")')
parser.add_option('--upload-filesize', dest='upload_filesize', default='512.0MiB', help='Filesize in MiB, GiB without spaces (default="512.0MiB")')
parser.add_option('--protocol', dest='protocol', choices=['https', 'http'], default='https', help='Protocol you want to use [http|https] (default="https")')
parser.add_option('--ignore-proxy', dest='ignore_proxy', default=False, action='store_true', help='Ignore any configured proxy server on this system for this request')
parser.add_option('--ignore-proxy', dest='ignore_proxy', default=False, action='store_true', help='Ignore any configured proxy server on this system for this request (default="false")')
parser.add_option('--ignore-sslcert', dest='ignore_sslcert', default=False, action='store_true', help='Ignore ssl certificate (default="false")')
parser.add_option('--api-url', dest='api_url', type='string', default='/ocs/v2.php/apps/serverinfo/api/v1/info', help='Url of the api (default="/ocs/v2.php/apps/serverinfo/api/v1/info")')
(options, args) = parser.parse_args()
# Print the version of this script
if options.version:
print('Version 2.0')
sys.exit(0)
print('Version 2.0')
sys.exit(0)
# Validate the user input...
if not options.username and not options.password and not options.hostname and not options.check:
parser.print_help()
sys.exit(3)
if not options.username:
parser.error('Username is required, use parameter [-u|--username].')
if not options.username and not options.nc_token:
parser.error('Username or nc-token is required, use parameter [-u|--username] or [--nc-token].')
sys.exit(3)
if not options.password:
parser.error('Password is required, use parameter [-p|--password].')
if not options.password and not options.nc_token:
parser.error('Password or nc-token is required, use parameter [-p|--password] or [--nc-token].')
sys.exit(3)
if not options.hostname:
@ -85,7 +94,7 @@ url_strip = re.compile(r"https?://")
hostname = url_strip.sub('', options.hostname).split('/')[0]
# Re-validate the api_url
if options.api_url.startswith('/'):
if options.api_url.startswith('/'):
api_url = options.api_url
else:
api_url = '/{0}'.format(options.api_url)
@ -93,22 +102,44 @@ else:
# Create the url to access the api
url = '{0}://{1}{2}'.format(options.protocol, hostname, api_url)
# Create the request
request = urllib.request.Request(url)
# Basic authentication...
# Encode credentials as base64
credential = base64.b64encode(bytes('%s:%s' % (options.username, options.password), 'ascii'))
request.add_header("Authorization", "Basic %s" % credential.decode('utf-8'))
request.add_header('OCS-APIRequest', 'true')
try:
with urllib.request.urlopen(request) as response:
content = response.read()
# Create the request
request = urllib.request.Request(url)
# Add the token header
if options.nc_token:
request.add_header('NC-Token',"%s" % options.nc_token)
else:
# Add the authentication and api request header
request.add_header("Authorization", "Basic %s" % credential.decode('utf-8'))
request.add_header('OCS-APIRequest','true')
# SSL/TLS certificate validation (see: https://stackoverflow.com/questions/19268548/python-ignore-certificate-validation-urllib2)
ctx = ssl.create_default_context()
if(options.ignore_sslcert):
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
# Proxy handler
if(options.ignore_proxy):
proxy_handler = urllib.request.ProxyHandler({})
ctx_handler = urllib.request.HTTPSHandler(context=ctx)
opener = urllib.request.build_opener(proxy_handler, ctx_handler)
response = opener.open(request)
else:
response = urllib.request.urlopen(request, context=ctx)
# Read the content
content = response.read()
except urllib.error.HTTPError as error: # User is not authorized (401)
print('UNKOWN - [WEBREQUEST] {0} {1}'.format(error.code, error.reason))
sys.exit(3)
print('UNKOWN - [WEBREQUEST] {0} {1}'.format(error.code, error.reason))
sys.exit(3)
except urllib.error.URLError as error: # Connection has timed out (wrong url / server down)
print('UNKOWN - [WEBREQUEST] {0}'.format(str(error.reason).split(']')[0].strip()))
@ -139,25 +170,24 @@ except AttributeError:
print('UNKOWN - [XML] Content contains no or wrong xml data... check the url and if the api is reachable!')
sys.exit(3)
# Get the nextcloud version... other informations about the system like RAM/CPU/DISK are nagios/centreon own checks - so we don't need them here...
# Performance data format
perfdata_format = "" # nagios
if(options.perfdata_format == 'centreon'): # centreon
perfdata_format = ","
# Get the nextcloud version...
# [output]
if options.check == 'system':
xml_system = xml_root.find('data').find('nextcloud').find('system')
xml_system_version = str(xml_system.find('version').text)
xml_system_version = str(xml_system.find('version').text)
print('OK - Nextcloud version: {0}'.format(xml_system_version))
sys.exit(0)
# Get the nextcloud theme
if options.check == 'theme':
xml_system = xml_root.find('data').find('nextcloud').find('system')
xml_system_theme = str(xml_system.find('theme').text)
print('OK - Nextcloud theme: {0}'.format(xml_system_theme))
sys.exit(0)
# Get informations about the storage
# [output + performance data]
if options.check == 'storage':
xml_storage = xml_root.find('data').find('nextcloud').find('storage')
@ -168,10 +198,11 @@ if options.check == 'storage':
xml_storage_storages_home = int(xml_storage.find('num_storages_home').text)
xml_storage_storages_other = int(xml_storage.find('num_storages_other').text)
print('OK - Users: {0}, files: {1}, storages: {2}, storages local: {3}, storages home: {4}, storages other: {5} | users={0}, files={1}, storages={2}, storages_local={3}, storages_home={4}, storage_other={5}'.format(xml_storage_users, xml_storage_files, xml_storage_storages, xml_storage_storages_local, xml_storage_storages_home, xml_storage_storages_other))
print('OK - Users: {1}, files: {2}, storages: {3}, storages local: {4}, storages home: {5}, storages other: {6} | users={1}{0} files={2}{0} storages={3}{0} storages_local={4}{0} storages_home={5}{0} storage_other={6}'.format(perfdata_format, xml_storage_users, xml_storage_files, xml_storage_storages, xml_storage_storages_local, xml_storage_storages_home, xml_storage_storages_other))
sys.exit(0)
# Get informations about the shares
# [output + performance data]
if options.check == 'shares':
xml_shares = xml_root.find('data').find('nextcloud').find('shares')
@ -183,10 +214,11 @@ if options.check == 'shares':
xml_shares_fed_shares_sent = int(xml_shares.find('num_fed_shares_sent').text)
xml_shares_fed_shares_received = int(xml_shares.find('num_fed_shares_received').text)
print('OK - Shares: {0}, shares user: {1}, shares groups: {2}, shares link: {3}, shares link no password: {4}, shares federation sent: {5}, shares federation received: {6} | shares={0}, shares_user={1}, shares_groups={2}, shares_link={3}, shares_link_no_password={4}, federation_shares_sent={5}, federation_shares_received={6}'.format(xml_shares_shares, xml_shares_shares_user, xml_shares_shares_groups, xml_shares_shares_link, xml_shares_shares_link_no_password, xml_shares_fed_shares_sent, xml_shares_fed_shares_received))
print('OK - Shares: {1}, shares user: {2}, shares groups: {3}, shares link: {4}, shares link no password: {5}, shares federation sent: {6}, shares federation received: {7} | shares={1}{0} shares_user={2}{0} shares_groups={3}{0} shares_link={4}{0} shares_link_no_password={5}{0} federation_shares_sent={6}{0} federation_shares_received={7}'.format(perfdata_format, xml_shares_shares, xml_shares_shares_user, xml_shares_shares_groups, xml_shares_shares_link, xml_shares_shares_link_no_password, xml_shares_fed_shares_sent, xml_shares_fed_shares_received))
sys.exit(0)
# Get informations about the webserver
# [output]
if options.check == 'webserver':
xml_webserver = str(xml_root.find('data').find('server').find('webserver').text)
@ -194,6 +226,7 @@ if options.check == 'webserver':
sys.exit(0)
# Get informations about php
# [output]
if options.check == 'php':
xml_php = xml_root.find('data').find('server').find('php')
@ -206,6 +239,7 @@ if options.check == 'php':
sys.exit(0)
# Get informations about the database
# [output + performance data]
if options.check == 'database':
xml_database = xml_root.find('data').find('server').find('database')
@ -217,6 +251,7 @@ if options.check == 'database':
sys.exit(0)
# Check the active users
# [output + performance data]
if options.check == 'activeUsers':
xml_activeUsers = xml_root.find('data').find('activeUsers')
@ -224,12 +259,12 @@ if options.check == 'activeUsers':
xml_activeUsers_last1hour = int(xml_activeUsers.find('last1hour').text)
xml_activeUsers_last24hours = int(xml_activeUsers.find('last24hours').text)
print('OK - Last 5 minutes: {0} user(s), last 1 hour: {1} user(s), last 24 hour: {2} user(s) | users_last_5_minutes={0}, users_last_1_hour={1}, users_last_24_hours={2}'.format(xml_activeUsers_last5minutes, xml_activeUsers_last1hour, xml_activeUsers_last24hours))
print('OK - Last 5 minutes: {1} user(s), last 1 hour: {2} user(s), last 24 hour: {3} user(s) | users_last_5_minutes={1}{0} users_last_1_hour={2}{0} users_last_24_hours={3}'.format(perfdata_format, xml_activeUsers_last5minutes, xml_activeUsers_last1hour, xml_activeUsers_last24hours))
sys.exit(0)
if options.check == 'uploadFilesize':
xml_php = xml_root.find('data').find('server').find('php')
# Get upload max filesize
xml_php_upload_max_filesize = int(xml_php.find('upload_max_filesize').text)
@ -238,7 +273,25 @@ if options.check == 'uploadFilesize':
if options.upload_filesize == upload_max_filesize:
print('OK - Upload max filesize: {0}'.format(upload_max_filesize))
sys.exit(0)
sys.exit(0)
else:
print('CRITICAL - Upload max filesize is set to {0}, but should be {1}'.format(upload_max_filesize, options.upload_filesize))
sys.exit(2)
# Get informations about any app updates
# [output]
if options.check == 'apps':
xml_apps = xml_root.find('data').find('nextcloud').find('system').find('apps')
xml_apps_num_updates_available = int(xml_apps.find('num_updates_available').text)
if xml_apps_num_updates_available == 0:
print('OK - No apps requiring update')
sys.exit(0)
else:
xml_apps_updates = xml_apps.find('app_updates')
xml_apps_list = []
for app in xml_apps_updates:
xml_apps_list.append('{0}->{1}'.format(app.tag, app.text))
print('WARNING - {0} apps require update: {1}'.format(xml_apps_num_updates_available, ' ,'.join(xml_apps_list)))
sys.exit(1)

View file

@ -1,6 +1,6 @@
Uploaders: Jan Wagner <waja@cyconet.org>
Recommends: python3-minimal
Version: b7e5755
Version: 2.0
Homepage: https://github.com/BornToBeRoot/check_nextcloud
Watch: https://github.com/BornToBeRoot/check_nextcloud <a class="commit-tease-sha"[^>]*>\s+([0-9a-f]+)\s+</a>
Watch: https://raw.githubusercontent.com/BornToBeRoot/check_nextcloud/master/check/check_nextcloud.py # ~~ Version ([0-9.]+) ~~
Description: Plugin script to monitor your nextcloud serverinfo API

View file

@ -1,3 +1,180 @@
* 2022-07-29 10.3
add mode check-rtt (cisco-rttmon-mib slas)
* 2022-07-21 10.2.1
increase cpu thresholds for linux, separate user/system/etc from iowait
* 2022-07-20 10.2
update glplugin, better get_table fallback handling
* 2022-05-05 10.1.0.3
fix a pull-request. Und das war damit auch der letzte Pull-Request, den ich in meinem Leben angenommen habe.
* 2022-05-04 10.1.0.2
use JSON::XS in Interface.pm to avoid misleading UNKNOWN error message
* 2022-02-23 10.1.0.1
suppress unknown arista sensors which are not marked as faulty
* 2022-02-18 10.1
check filesystems in Arista (full Log/Core stops syslog and accounting)
accept disabled sensors
* 2022-01-13 10.0.0.3
bugfix in arista power supply
* 2022-01-07 10.0.0.2
bugfix in f5 ltm detail output
* 2021-11-22 10.0.0.1
tweak barracuda hardware-health snmp parameters
* 2021-11-16 10.0
use json for temporary files
* 2021-10-13 9.1
add Pulse Secure
* 2021-10-08 9.0.1.2
update git with latest cisco license gedoens
* 2021-09-21 9.0.1.1
remove broken line from Makefile.am
* 2021-09-08 9.0.1
improve cisco license checks
* 2021-09-01 9.0
add Versa Appliance, add HP Aruba
* 2021-08-24 8.5.0.1
tweak barracuda snmp params for interface/route checks
* 2021-07-27 8.5
improve Barracuda cluster-check
* 2021-06-30 8.4
add bgp for huawei
* 2021-06-16 8.3.3.3
bugfix in UCD-MIB memory
* 2021-05-31 8.3.3.2
bugfix in IOS cpu-load for very old models without CISCO-PROCESS-MIB
* 2021-05-31 8.3.3.1
bugfix in f5 memory-usage, correct negative values
* 2021-05-20 8.3.3
Add vpn sessions for Fortigate PR #279
* 2021-05-18 8.3.2.4
optimize etherlike and rmon walks
* 2021-05-12 8.3.2.3
save bgp peer local addresses and show them in the error case
* 2021-04-29 8.3.2.2
Blacklist storage device "junosprocfs" on JunOS (Juniper) devices PR #278
* 2021-04-15 8.3.2.1
bugfix in f5 cpu-load, correct negative values
* 2021-03-23 8.3.2
query LM-SENSORS-MIB only if it exists on Linux (it may hang even if not existing)
* 2021-03-19 8.3.1.2
bugfix in CISCO-ENTITY-SENSOR-MIB. Scale values correctly.
* 2021-03-02 8.3.1.1
bugfix in interface-stack-status (triggered when --name did not match)
* 2021-02-12 8.3.1
add mode license-status for cisco
* 2021-02-08 8.3
split Bluecat in AddressManager and DnsDhcpServer
* 2021-01-28 8.2.0.2
do not use cpmCPUMemoryHCCommitted, except if you want mem usage > 100%
* 2021-01-27 8.2.0.1
check the memory of all members in a cisco stack only if there are > 1 members
* 2021-01-22 8.2
check the memory of all members in a cisco stack
* 2021-01-18 8.1.0.1
bugfix in Bluecat jvm
* 2021-01-18 8.1
add Bluecat Address Manager
* 2021-01-13 8.0.0.2
bugfix in HOST-RESOURCE-MIB memory (Arista triggered)
bugfix in CISCO-ENVMON-MIB, temperatures > 200
* 2021-01-13 8.0.0.1
bugfix in arista bgp, mitigate admin down
* 2020-10-22 8.0
broadcast traffic is now shown as percentage of the overall traffic (...broadcast_in) and percentage of the available bandwitdth (..._broadcast_usage_in).
errors and discards are now calculated as percentage of all received/sent packets.
TenGig-VRF-MPLS-Dingsbums without errors and discard metrics are no longer treated as StackSubs.
* 2020-10-12 7.13
add Vormetric Appliance
* 2020-09-18 7.12.2
add some exceptions to hrDeviceDiskStorage and hrDeviceNetwork
* 2020-09-08 7.12.1.3
fix a bug in mode count-routes, update glplugin
* 2020-07-13 7.12.1.2
improve output for connect-vips
* 2020-07-13 7.12.1.1
bugfix in UCD-MIB swap
* 2020-07-10 7.12.1
try to fallback to ucd if neither sysUptime nor sysDescr exist
* 2020-06-04 7.12
add mode watch-vips and connect-vips for F5
* 2020-06-02 7.11.1
check the number of nodes in a Fortigate cluster
* 2020-05-21 7.11
add bgp4 modes for arista, use 2nd context for cisco bgp4
* 2020-05-19 7.10.4.1
fix a typo
* 2020-05-05 7.10.4
check increase of sessions for Cisco
(detect freeze with --mode vpn-sessions --criticalx sessions_per_sec=0.001:)
add AVM 7580
* 2020-03-20 7.10.3
add mode vpn-sessions (IOS and ASA)
* 2020-03-16 7.10.2.1
blacklist nfs-mounts in hrDeviceDiskStorage
* 2020-03-10 7.10.2
fix HP Aruba checks, add nore from ENTITY-SENSOR-MIB
* 2020-02-20 7.10.1.9
fix a bug in interface-etherstats for OLD-CISCO-INTERFACES-MIB
* 2020-01-21 7.10.1.8
fix a bug in Cisco memory, for Cisco emulation mode of Bel VPN Gate
* 2020-01-18 7.10.1.7
issue #229 fix redundant argument in sprintf
issue #228 fix operstatus in linuxlocal
* 2020-01-16 7.10.1.6
fix a bug in verbose mode if --nosensors is used
* 2019-12-06 7.10.1.5
update GLPlugin, reduce default maxrepetitions to 20
* 2019-12-05 7.10.1.4
reduce maxrepetitions for f5 sysCpuTable and ifTables
* 2019-12-04 7.10.1.3
add --nosensors which skips endless entSensor[Threshold]Table for Nexuses
* 2019-11-25 7.10.1.2
fix a division by 0 for cisco reserved memory
* 2019-10-07 7.10.1.1
fix a bug in cisco wlan accesspoint-modes (InetAddrType)
* 2019-10-04 7.10.1
add session-usage for palo alto
* 2019-08-30 7.10.0.7
update glplugin, more nexus hardware-health improvements
* 2019-08-29 7.10.0.6
reduce runtime for nexus hardware-health
* 2019-08-20 7.10.0.5
fix EIGRP filtering
* 2019-07-29 7.10.0.4.1
fix a bug in fortigate ha-role
* 2019-07-22 7.10.0.4
fix a bug in interface-uptime
* 2019-07-19 7.10.0.3
fix a bug in interface-uptime
* 2019-07-07 7.10.0.2
fix a bug in mode ha-role for Fortigate
* 2019-06-25 7.10.0.1
fix a bug in bgp/route modes for the non-standalone version (InetAddressMaker)
* 2019-06-21 7.10
remove duplicate routes (ip-table + inet-table)
--report long+address shows ip addresses for interfaces
* 2019-06-14 7.9.0.4
finish barracuda ha-role mode
* 2019-06-14 7.9.0.3
detect f5 firmware versions 14+
* 2019-06-12 7.9.0.2
fix routes. inetCidrRouteTable does not really replace ipCidrRouteTable
* 2019-06-12 7.9.0.1
fallback to BGP4-MIB if CISCO-BGP4-MIB is incomplete
* 2019-06-11 7.9
add EIGRP
fix ASA user/connection/session-count
* 2019-06-05 7.8
GLPLugin with better ip4/ip6 handling
fix huawei subclasses
interfaces --name filter expression can contain _adminup_ as a secondary
filter
route modes can handle v6
use OSPFV3-MIB, support v6
add CISCO-BGP4-MIB, support v6
* 2019-04-12 7.7
add Barracuda
* 2019-04-12 7.6.1
add mode count-connections for F5
* 2019-03-20 7.6
add mode watch-ospf-neighbors
* 2019-02-19 7.5.0.1

View file

@ -11,6 +11,8 @@ use IO::File;
use File::Basename;
use Digest::MD5 qw(md5_hex);
use Errno;
use JSON;
use File::Slurp qw(read_file);
use Data::Dumper;
$Data::Dumper::Indent = 1;
eval {
@ -20,7 +22,7 @@ eval {
$Data::Dumper::Sparseseen = 1;
};
our $AUTOLOAD;
*VERSION = \'3.2.5';
*VERSION = \'5.1.1';
use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
@ -77,8 +79,10 @@ sub dumper {
sub no_such_mode {
my ($self) = @_;
printf "Mode %s is not implemented for this type of device\n",
$self->opts->mode;
$self->nagios_exit(3,
sprintf "Mode %s is not implemented for this type of device",
$self->opts->mode
);
exit 3;
}
@ -893,7 +897,7 @@ sub getopts {
# der fliegt raus, sonst gehts gleich wieder in needs_restart rein
next if $option eq "runas";
foreach my $spec (map { $_->{spec} } @{$Monitoring::GLPlugin::plugin->opts->{_args}}) {
if ($spec =~ /^(\w+)[\|\w+]*=(.*)/) {
if ($spec =~ /^([\-\w]+)[\?\+:\|\w+]*=(.*)/) {
if ($1 eq $option && $2 =~ /s%/) {
foreach (keys %{$self->opts->$option()}) {
push(@restart_opts, sprintf "--%s", $option);
@ -1451,9 +1455,12 @@ sub protect_value {
});
} else {
# if the device gives us an clearly wrong value, simply use the last value.
my $laststate = $self->load_state(name => 'protect_'.$ident.'_'.$key);
my $laststate = $self->load_state(name => 'protect_'.$ident.'_'.$key) || {
exception => 0,
};
$self->debug(sprintf "self->{%s} is %s and invalid for the %dth time",
$key, $self->{$key}, $laststate->{exception} + 1);
$key, defined $self->{$key} ? $self->{$key} : "<undef>",
$laststate->{exception} + 1);
if ($laststate->{exception} <= 5) {
# but only 5 times.
# if the error persists, somebody has to check the device.
@ -1476,7 +1483,11 @@ sub save_state {
}
my $seekfh = IO::File->new();
if ($seekfh->open($tmpfile, "w")) {
$seekfh->printf("%s", Data::Dumper::Dumper($params{save}));
my $coder = JSON::XS->new->ascii->pretty->allow_nonref;
my $jsonscalar = $coder->encode($params{save});
$seekfh->print($jsonscalar);
# the very time-consuming old way.
# $seekfh->printf("%s", Data::Dumper::Dumper($params{save}));
$seekfh->flush();
$seekfh->close();
$self->debug(sprintf "saved %s to %s",
@ -1495,10 +1506,18 @@ sub load_state {
our $VAR1;
eval {
delete $INC{$statefile} if exists $INC{$statefile}; # else unit tests fail
require $statefile;
my $jsonscalar = read_file($statefile);
my $coder = JSON::XS->new->ascii->pretty->allow_nonref;
$VAR1 = $coder->decode($jsonscalar);
};
if($@) {
printf "FATAL: Could not load state!\n";
$self->debug(sprintf "json load from %s failed. fallback", $statefile);
eval {
require $statefile;
};
if($@) {
printf "FATAL: Could not load old state in perl format!\n";
}
}
$self->debug(sprintf "load %s from %s", Data::Dumper::Dumper($VAR1), $statefile);
return $VAR1;

View file

@ -417,6 +417,7 @@ sub nagios_exit {
$output;
}
if (! exists $self->{suppress_messages}) {
$output =~ s/[^[:ascii:]]//g;
print $output;
}
exit $code;
@ -530,12 +531,14 @@ sub check_thresholds {
$value = $params{value};
my $metric = $params{metric};
if ($metric ne 'default') {
$warningrange = exists $self->{thresholds}->{$metric}->{warning} ?
$self->{thresholds}->{$metric}->{warning} :
$self->{thresholds}->{default}->{warning};
$criticalrange = exists $self->{thresholds}->{$metric}->{critical} ?
$self->{thresholds}->{$metric}->{critical} :
$self->{thresholds}->{default}->{critical};
$warningrange = defined $params{warning} ? $params{warning} :
(exists $self->{thresholds}->{$metric}->{warning} ?
$self->{thresholds}->{$metric}->{warning} :
$self->{thresholds}->{default}->{warning});
$criticalrange = defined $params{critical} ? $params{critical} :
(exists $self->{thresholds}->{$metric}->{critical} ?
$self->{thresholds}->{$metric}->{critical} :
$self->{thresholds}->{default}->{critical});
} else {
$warningrange = (defined $params{warning}) ?
$params{warning} : $self->{thresholds}->{default}->{warning};

View file

@ -142,6 +142,27 @@ sub getopts {
*{"all_my_opts"} = sub {
return $self->{opts}->{all_my_opts};
};
foreach (@{$self->{_args}}) {
$_->{spec} =~ /^([\w\-]+)/;
my $spec = $1;
my $envname = uc $spec;
$envname =~ s/\-/_/g;
if (! exists $commandline{$spec}) {
# Kommandozeile hat oberste Prioritaet
# Also: --option ueberschreibt NAGIOS__HOSTOPTION
# Aaaaber: extra-opts haben immer noch Vorrang vor allem anderen.
# https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
# beschreibt das anders, Posix-Tools verhalten sich auch entsprechend.
# Irgendwann wird das hier daher umgeschrieben, so dass extra-opts
# die niedrigste Prioritaet erhalten.
if (exists $ENV{'NAGIOS__SERVICE'.$envname}) {
$commandline{$spec} = $ENV{'NAGIOS__SERVICE'.$envname};
} elsif (exists $ENV{'NAGIOS__HOST'.$envname}) {
$commandline{$spec} = $ENV{'NAGIOS__HOST'.$envname};
}
}
$self->{opts}->{$spec} = $_->{default};
}
foreach (map { $_->{spec} =~ /^([\w\-]+)/; $1; }
grep { exists $_->{required} && $_->{required} } @{$self->{_args}}) {
do { $self->print_usage(); exit 3 } if ! exists $commandline{$_};
@ -170,8 +191,9 @@ sub getopts {
$_->{spec} =~ /^([\w\-]+)/;
my $aliasfield = $1;
next if $self->{opts}->{$field};
$self->{opts}->{$field} = $self->{opts}->{$aliasfield};
*{"$field"} = sub {
return $self->{opts}->{$aliasfield};
return $self->{opts}->{$field};
};
}
foreach (grep { exists $_->{decode} } @{$self->{_args}}) {

View file

@ -0,0 +1,70 @@
package Monitoring::GLPlugin::Item;
our @ISA = qw(Monitoring::GLPlugin);
use strict;
sub new {
my ($class, %params) = @_;
my $self = {
blacklisted => 0,
info => undef,
extendedinfo => undef,
};
bless $self, $class;
$self->init(%params);
return $self;
}
sub check {
my ($self, $lists) = @_;
my @lists = $lists ? @{$lists} : grep { ref($self->{$_}) eq "ARRAY" } keys %{$self};
foreach my $list (@lists) {
$self->add_info('checking '.$list);
foreach my $element (@{$self->{$list}}) {
$element->blacklist() if $self->is_blacklisted();
$element->check();
}
}
}
sub init_subsystems {
my ($self, $subsysref) = @_;
foreach (@{$subsysref}) {
my ($subsys, $class) = @{$_};
$self->{$subsys} = $class->new()
if (! $self->opts->subsystem || grep {
$_ eq $subsys;
} map {
s/^\s+|\s+$//g;
$_;
} split /,/, $self->opts->subsystem);
}
}
sub check_subsystems {
my ($self) = @_;
my @subsystems = grep { $_ =~ /.*_subsystem$/ } keys %{$self};
foreach (@subsystems) {
$self->{$_}->check();
}
$self->reduce_messages_short(join(", ",
map {
sprintf "%s working fine", $_;
} map {
s/^\s+|\s+$//g;
$_;
} split /,/, $self->opts->subsystem
)) if $self->opts->subsystem;
}
sub dump_subsystems {
my ($self) = @_;
my @subsystems = grep { $_ =~ /.*_subsystem$/ } keys %{$self};
foreach (@subsystems) {
$self->{$_}->dump();
}
}
1;
__END__

View file

@ -5,6 +5,8 @@ our @ISA = qw(Monitoring::GLPlugin);
use strict;
use File::Basename;
use Digest::MD5 qw(md5_hex);
use JSON;
use File::Slurp qw(read_file);
use Module::Load;
use AutoLoader;
our $AUTOLOAD;
@ -223,6 +225,15 @@ sub add_snmp_args {
required => 0,
decode => "rfc3986",
);
$self->add_arg(
spec => '--join-communities',
help => '--join-communities
It --community2 is used, run the query with community, then community2
and add up both results. The default is to use community for the initial
handshake and community2 for querying (bgp and ospf)',
required => 0,
default => 0,
);
$self->add_arg(
spec => 'snmpwalk=s',
help => '--snmpwalk
@ -359,12 +370,39 @@ sub init {
printf "OK - all requested oids are in %s\n", $name;
}
} else {
my @credentials = ();
my $credmapping = {
"-community" => "-c",
"-privpassword" => "-X",
"-privprotocol" => "-x",
"-authpassword" => "-A",
"-authprotocol" => "-a",
"-username" => "-u",
"-context" => "-n",
"-version" => "-v",
};
foreach (keys %{$Monitoring::GLPlugin::SNMP::session_params}) {
if (exists $credmapping->{$_}) {
push(@credentials, sprintf "%s '%s'",
$credmapping->{$_},
$Monitoring::GLPlugin::SNMP::session_params->{$_}
);
}
}
if (grep(/-X/, @credentials) and grep(/-A/, @credentials)) {
push(@credentials, "-l authPriv");
} elsif (grep(/-A/, @credentials)) {
push(@credentials, "-l authNoPriv");
} else {
push(@credentials, "-l noAuthNoPriv");
}
my $credentials = join(" ", @credentials);
$credentials =~ s/-v2 /-v2c /g;
printf "rm -f %s\n", $name;
foreach (@trees) {
printf "%s -ObentU -v%s -c %s %s %s >> %s\n",
printf "%s -ObentU %s %s %s >> %s\n",
($self->mode =~ /bulk/) ? "snmpbulkwalk -t 15 -r 20" : "snmpwalk",
$self->opts->protocol,
$self->opts->community,
$credentials,
$self->opts->hostname,
$_, $name;
}
@ -783,7 +821,7 @@ sub init {
push(@{$mibdepot}, ['1.3.6.1.2.1.65', 'ietf', 'v2', 'WWW-MIB']);
push(@{$mibdepot}, ['1.3.6.1.4.1.8072', 'net-snmp', 'v2', 'NET-SNMP-MIB']);
my $oids = $self->get_entries_by_walk(-varbindlist => [
'1.3.6.1.2.1', '1.3.6.1.4.1',
'1.3.6.1.2.1', '1.3.6.1.4.1', '1',
]);
foreach my $mibinfo (@{$mibdepot}) {
next if $self->opts->protocol eq "1" && $mibinfo->[2] ne "v1";
@ -807,7 +845,8 @@ sub init {
}
my $toplevels = {};
map {
/^(1\.3\.6\.1\.(\d+)\.(\d+)\.\d+\.\d+)\./; $toplevels->{$1} = 1;
/^(1\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+)\./ and $toplevels->{$1} = 1;
/^(1\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+\.\d+)\./ and $toplevels->{$1} = 1;
} keys %{$unknowns};
foreach (sort {$a cmp $b} keys %{$toplevels}) {
push(@outputlist, ["<unknown>", $_]);
@ -824,7 +863,8 @@ sub init {
my $confirmed = {};
foreach my $mib (keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids}) {
foreach my $sym (keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}}) {
if (my $obj = $self->get_snmp_object($mib, $sym)) {
my $obj = $self->get_snmp_object($mib, $sym);
if (defined $obj) {
my $oid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$sym};
if (exists $unknowns->{$oid}) {
$confirmed->{$oid} = sprintf '%s::%s = %s', $mib, $sym, $obj;
@ -898,8 +938,11 @@ sub check_snmp_and_model {
}
}
$self->opts->override_opt('hostname', 'walkhost') if $self->opts->mode ne 'walk';
my $current_oid = undef;
my @multiline_string = ();
open(MESS, $self->opts->snmpwalk);
while(<MESS>) {
next if /No Such Object available on this agent at this OID/;
# SNMPv2-SMI::enterprises.232.6.2.6.7.1.3.1.4 = INTEGER: 6
if (/^([\d\.]+) = .*?INTEGER: .*\((\-*\d+)\)/) {
# .1.3.6.1.2.1.2.2.1.8.1 = INTEGER: down(2)
@ -909,6 +952,9 @@ sub check_snmp_and_model {
$response->{$1} = $2;
} elsif (/^([\d\.]+) = STRING:\s*$/) {
$response->{$1} = "";
} elsif (/^([\.\d]+) = STRING: "([^"]*)$/) {
$current_oid = $1;
push(@multiline_string, $2);
} elsif (/^([\d\.]+) = Network Address: (.*)/) {
$response->{$1} = $2;
} elsif (/^([\d\.]+) = Hex-STRING: (.*)/) {
@ -929,6 +975,17 @@ sub check_snmp_and_model {
} elsif (/^([\d\.]+) = "(.*?)"/) {
$response->{$1} = $2;
$response->{$1} =~ s/\s+$//;
} elsif (/^([^"]*)"$/ && @multiline_string && $current_oid) {
push(@multiline_string, $1);
$response->{$current_oid} = join("\n", @multiline_string);
$current_oid = undef;
@multiline_string = ();
} elsif (/^"$/ && @multiline_string && $current_oid) {
$response->{$current_oid} = join("\n", @multiline_string);
$current_oid = undef;
@multiline_string = ();
} elsif (/(.*)/ && @multiline_string && $current_oid) {
push(@multiline_string, $1);
}
}
close MESS;
@ -981,25 +1038,27 @@ sub check_snmp_and_model {
scalar localtime (time - $sysUptime),
$self->human_timeticks($sysUptime));
}
if (defined $sysUptime && defined $sysDescr) {
if ($hrSystemUptime) {
# Bei Linux-basierten Geraeten wird snmpEngineTime viel zu haeufig
# durchgestartet, also lieber das hier.
$self->{uptime} = $hrSystemUptime;
# Es sei denn, snmpEngineTime ist tatsaechlich groesser, dann gilt
# wiederum dieses. Mag sein, dass der zahlenwert hier manchmal huepft
# und ein Performancegraph Zacken bekommt, aber das ist mir egal.
# es geht nicht um Graphen in Form einer ansteigenden Geraden, sondern
# um das Erkennen von spontanen Reboots und das Vermeiden von
# falschen Alarmen.
if ($snmpEngineTime && $snmpEngineTime > $hrSystemUptime) {
$self->{uptime} = $snmpEngineTime;
}
} elsif ($snmpEngineTime) {
$self->{uptime} = $snmpEngineTime;
} else {
$self->{uptime} = $sysUptime;
my $best_uptime = undef;
if ($hrSystemUptime) {
# Bei Linux-basierten Geraeten wird snmpEngineTime viel zu haeufig
# durchgestartet, also lieber das hier.
$best_uptime = $hrSystemUptime;
# Es sei denn, snmpEngineTime ist tatsaechlich groesser, dann gilt
# wiederum dieses. Mag sein, dass der zahlenwert hier manchmal huepft
# und ein Performancegraph Zacken bekommt, aber das ist mir egal.
# es geht nicht um Graphen in Form einer ansteigenden Geraden, sondern
# um das Erkennen von spontanen Reboots und das Vermeiden von
# falschen Alarmen.
if ($snmpEngineTime && $snmpEngineTime > $hrSystemUptime) {
$best_uptime = $snmpEngineTime;
}
} elsif ($snmpEngineTime) {
$best_uptime = $snmpEngineTime;
} else {
$best_uptime = $sysUptime;
}
if (defined $best_uptime && defined $sysDescr) {
$self->{uptime} = $best_uptime;
$self->{productname} = $sysDescr;
$self->{sysobjectid} = $self->get_snmp_object('MIB-2-MIB', 'sysObjectID', 0);
$self->debug(sprintf 'uptime: %s', $self->{uptime});
@ -1028,16 +1087,16 @@ sub check_snmp_and_model {
scalar localtime (time - $self->{uptime}));
$Monitoring::GLPlugin::SNMP::uptime = $self->{uptime};
$self->debug('whoami: '.$self->{productname});
last;
return;
}
}
if (! $mein_lieber_freund_und_kupferstecher) {
$self->add_message(UNKNOWN,
'got neither sysUptime nor sysDescr nor any other useful information, is this snmp agent working correctly?');
'got neither sysUptime and sysDescr nor any other useful information, is this snmp agent working correctly?');
}
} else {
$self->add_message(UNKNOWN,
'got neither sysUptime nor sysDescr, is this snmp agent working correctly?');
'Did not receive both sysUptime and sysDescr, is this snmp agent working correctly?');
}
$Monitoring::GLPlugin::SNMP::session->close if $Monitoring::GLPlugin::SNMP::session;
}
@ -1147,8 +1206,14 @@ sub establish_snmp_session {
} else {
my $max_msg_size = $session->max_msg_size();
#$session->max_msg_size(4 * $max_msg_size);
if ($self->opts->protocol eq "1") {
$Monitoring::GLPlugin::SNMP::maxrepetitions = 0;
} else {
$Monitoring::GLPlugin::SNMP::maxrepetitions = 20;
}
$Monitoring::GLPlugin::SNMP::max_msg_size = $max_msg_size;
$Monitoring::GLPlugin::SNMP::session = $session;
$Monitoring::GLPlugin::SNMP::session_params = \%params;
}
} else {
$self->add_message(CRITICAL,
@ -1234,6 +1299,24 @@ sub mult_snmp_max_msg_size {
$Monitoring::GLPlugin::SNMP::session->max_msg_size($factor * $Monitoring::GLPlugin::SNMP::session->max_msg_size()) if $Monitoring::GLPlugin::SNMP::session;
}
sub bulk_baeh_reset {
my ($self, $maxrepetitions) = @_;
$self->reset_snmp_max_msg_size();
$Monitoring::GLPlugin::SNMP::maxrepetitions =
int($Monitoring::GLPlugin::SNMP::session->max_msg_size() * 0.017);
}
sub bulk_is_baeh {
my ($self, $maxrepetitions) = @_;
$maxrepetitions ||= 1;
$Monitoring::GLPlugin::SNMP::maxrepetitions = int($maxrepetitions);
}
sub get_max_repetitions {
my ($self) = @_;
return $Monitoring::GLPlugin::SNMP::maxrepetitions;
}
sub no_such_model {
my ($self) = @_;
printf "Model %s is not implemented\n", $self->{productname};
@ -1263,8 +1346,10 @@ sub no_such_mode {
}
}
if (ref($self) eq "Monitoring::GLPlugin::SNMP") {
printf "Mode %s is not implemented for this type of device\n",
$self->opts->mode;
$self->nagios_exit(3,
sprintf "Mode %s is not implemented for this type of device",
$self->opts->mode
);
exit 3;
}
}
@ -1278,9 +1363,10 @@ sub ago_sysuptime {
my ($self, $eventtime) = @_;
# if there is an oid containing the value of sysUptime at the time of
# a certain event (e.g. cipSecFailTime), this method returns the
# time that has passed since the event.
# time in seconds that has passed since the event.
# sysUptime overflows at 2**32, so it is possible that the eventtime is
# bigger than sysUptime
# the eventtime value must come as 1/100s, do not normalize it before.
#
# 0-----------------|---------------X
# event=2Mio sysUptime=5.5Mio
@ -1292,11 +1378,10 @@ sub ago_sysuptime {
# event happened (100k + (2**32 - 2Mio)) seconds ago
#
my $sysUptime = $self->get_snmp_object('MIB-2-MIB', 'sysUpTime', 0);
$sysUptime /= 100;
if ($eventtime > $sysUptime) {
return $sysUptime + (2**32 - $eventtime);
return ($sysUptime + (2**32 - $eventtime)) / 100;
} else {
return $sysUptime - $eventtime;
return ($sysUptime - $eventtime) / 100;
}
}
@ -1358,59 +1443,72 @@ sub require_mib {
}
sub implements_mib {
my ($self, $mib) = @_;
my ($self, $mib, $table) = @_;
$self->require_mib($mib);
if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}) {
return 0;
}
my $sysobj = $self->get_snmp_object('MIB-2-MIB', 'sysObjectID', 0);
$sysobj =~ s/^\.// if $sysobj;
if ($sysobj && $sysobj eq $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}) {
$self->debug(sprintf "implements %s (sysobj exact)", $mib);
return 1;
}
if ($sysobj && $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib} eq
substr $sysobj, 0, length $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}) {
$self->debug(sprintf "implements %s (sysobj)", $mib);
return 1;
if (! $table) {
my $sysobj = $self->get_snmp_object('MIB-2-MIB', 'sysObjectID', 0);
$sysobj =~ s/^\.// if $sysobj;
if ($sysobj && $sysobj eq $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}) {
$self->debug(sprintf "implements %s (sysobj exact)", $mib);
return 1;
}
if ($sysobj && $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib} eq
substr $sysobj, 0, length $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}) {
$self->debug(sprintf "implements %s (sysobj)", $mib);
return 1;
}
}
my $check_oid = $table ?
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$table} :
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib};
# some mibs are only composed of tables
my $traces;
if ($self->opts->snmpwalk) {
my @matches;
my @matches;
# exact match
push(@matches, @{[map {
$_, $self->rawdata->{$_}
} grep {
$_ eq $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}
} keys %{$self->rawdata}]});
# partial match (add trailing dot)
my $check = $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib};
$check =~ s/\.?$/./;
push(@matches, @{[map {
$_, $self->rawdata->{$_}
push(@matches, @{[map {
$_, $self->rawdata->{$_}
} grep {
substr($_, 0, length($check)) eq $check
} keys %{$self->rawdata}]});
$traces = {@matches};
$_ eq $check_oid
} keys %{$self->rawdata}]});
# partial match (add trailing dot)
$check_oid =~ s/\.?$/./;
push(@matches, @{[map {
$_, $self->rawdata->{$_}
} grep {
substr($_, 0, length($check_oid)) eq $check_oid
} keys %{$self->rawdata}]});
$traces = {@matches};
} else {
my %params = (
-varbindlist => [
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}
$check_oid
]
);
if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
$params{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
$params{-contextname} = $self->opts->contextname if $self->opts->contextname;
}
my $timeout = $Monitoring::GLPlugin::SNMP::session->timeout();
$Monitoring::GLPlugin::SNMP::session->timeout(10);
$traces = $Monitoring::GLPlugin::SNMP::session->get_next_request(%params);
$Monitoring::GLPlugin::SNMP::session->timeout($timeout);
}
if ($traces && # must find oids following to the ident-oid
! exists $traces->{$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib}} && # must not be the ident-oid
grep { # following oid is inside this tree
substr($_, 0, length($Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib})) eq $Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{$mib};
substr($_, 0, length($check_oid)) eq $check_oid
} keys %{$traces}) {
if (exists $traces->{$check_oid} &&
$traces->{$check_oid} eq "endOfMibView") {
return 0;
}
$self->debug(sprintf "implements %s (found traces)", $mib);
return 1;
}
@ -1501,8 +1599,15 @@ sub create_entry_cache_file {
}
sub update_entry_cache {
my ($self, $force, $mib, $table, $key_attrs) = @_;
my ($self, $force, $mib, $table, $key_attrs, $last_change) = @_;
$self->debug(sprintf "last change of %s::%s was %s",
$mib, $table, scalar localtime $last_change) if $last_change;
my $update_deadline = time - 3600;
if ($last_change) {
# epoch timestamp, which is a hint when some table was last updated
$update_deadline = ($last_change + 60)
if $last_change > $update_deadline;
}
my $must_update = 0;
if (ref($key_attrs) ne "ARRAY") {
if ($key_attrs eq 'flat_indices') {
@ -1557,9 +1662,14 @@ sub save_cache {
$self->create_statefilesdir();
my $statefile = $self->create_entry_cache_file($mib, $table, join('#', @{$key_attrs}));
my $tmpfile = $statefile.$$.rand();
open(STATE, ">".$tmpfile);
printf STATE Data::Dumper::Dumper($self->{$cache});
close STATE;
my $fh = IO::File->new();
if ($fh->open($tmpfile, "w")) {
my $coder = JSON::XS->new->ascii->pretty->allow_nonref;
my $jsonscalar = $coder->encode($self->{$cache});
$fh->print($jsonscalar);
$fh->flush();
$fh->close();
}
rename $tmpfile, $statefile;
$self->debug(sprintf "saved %s to %s",
Data::Dumper::Dumper($self->{$cache}), $statefile);
@ -1571,25 +1681,26 @@ sub load_cache {
my $statefile = $self->create_entry_cache_file($mib, $table, join('#', @{$key_attrs}));
$self->{$cache} = {};
if ( -f $statefile) {
my $jsonscalar = read_file($statefile);
our $VAR1;
our $VAR2;
eval {
require $statefile;
my $coder = JSON::XS->new->ascii->pretty->allow_nonref;
$VAR1 = $coder->decode($jsonscalar);
};
if($@) {
printf "FATAL: Could not load cache!\n";
$self->debug(sprintf "json load from %s failed. fallback", $statefile);
delete $INC{$statefile} if exists $INC{$statefile}; # else unit tests fail
eval "$jsonscalar";
if($@) {
printf "FATAL: Could not load cache in perl format!\n";
$self->debug(sprintf "fallback perl load from %s failed", $statefile);
}
}
# keinesfalls mehr require verwenden!!!!!!
# beim require enthaelt VAR1 andere werte als beim slurp
# und zwar diejenigen, die beim letzten save_cache geschrieben wurden.
my $content = do { local (@ARGV, $/) = $statefile; my $x = <>; close ARGV; $x };
$VAR1 = eval "$content";
$self->debug(sprintf "load %s", Data::Dumper::Dumper($VAR1));
$self->{$cache} = $VAR1;
}
}
################################################################
# top-level convenience functions
#
@ -1781,7 +1892,7 @@ sub get_table_row_oids {
} map {
[$_, $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$_}]
} keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}};
return @columns;
return $self->sort_oids(\@columns);
}
# get_snmp_table_objects('MIB-Name', 'Table-Name', 'Table-Entry', [indices])
@ -1792,12 +1903,13 @@ sub get_snmp_table_objects {
$rows ||= [];
$self->require_mib($mib);
my @entries = ();
my $augmenting_table;
my @augmenting = ();
my @augmenting_tables = ();
my $sym_lookup = {};
$self->debug(sprintf "get_snmp_table_objects %s %s", $mib, $table);
if ($table =~ /^(.*?)\+(.*)/) {
$table = $1;
$augmenting_table = $2;
@augmenting_tables = split(/\+/, $2);
}
my $entry = $table;
$entry =~ s/Table/Entry/g;
@ -1818,7 +1930,7 @@ sub get_snmp_table_objects {
my $augmenting_tableoid = undef;
my @columns = $self->get_table_row_oids($mib, $entry, $rows, $sym_lookup);
my @augmenting_columns = ();
if($augmenting_table) {
foreach my $augmenting_table (@augmenting_tables) {
my $augmenting_entry = $augmenting_table;
$augmenting_entry =~ s/Table/Entry/g;
if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$augmenting_entry}) {
@ -1826,12 +1938,14 @@ sub get_snmp_table_objects {
$augmenting_entry = $augmenting_table;
$augmenting_entry =~ s/Table/TableEntry/g;
if (! exists $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$augmenting_entry}) {
$augmenting_table = undef;
$augmenting_entry = undef;
}
}
if ($augmenting_table) {
if ($augmenting_entry) {
$self->debug(sprintf "get_snmp_table_objects augment %s %s with %s", $mib, $table, $augmenting_table);
@augmenting_columns = $self->get_table_row_oids($mib, $augmenting_entry, $rows, $sym_lookup);
$augmenting_tableoid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$augmenting_table};
push(@augmenting, [$augmenting_tableoid, \@augmenting_columns]);
}
}
if (scalar(@{$indices}) == 1 && $indices->[0] == -1) {
@ -1839,7 +1953,8 @@ sub get_snmp_table_objects {
my $result = $self->get_entries(
-columns => \@columns,
);
if ($augmenting_table) {
foreach (@augmenting) {
my($augmenting_tableoid, @augmenting_columns) = ($_->[0], @{$_->[1]});
my $augmenting_result = $self->get_entries(
-columns => \@augmenting_columns,
);
@ -1851,8 +1966,9 @@ sub get_snmp_table_objects {
$self->get_indices(
-baseoid => $entryoid,
-oids => [keys %{$result}]);
@entries = $self->make_symbolic($mib, $result, \@indices, $sym_lookup);
@entries = map { $_->{indices} = shift @indices; $_ } @entries;
@entries = map {
$_->{indices} = shift @indices; $_
} @entries = $self->make_symbolic($mib, $result, \@indices, $sym_lookup);
$self->debug(sprintf "get_snmp_table_objects mini returns %d entries",
scalar(@entries));
} elsif (scalar(@{$indices}) == 1) {
@ -1862,7 +1978,8 @@ sub get_snmp_table_objects {
-endindex => $index,
-columns => \@columns,
);
if ($augmenting_table) {
foreach (@augmenting) {
my($augmenting_tableoid, @augmenting_columns) = ($_->[0], @{$_->[1]});
my $augmenting_result = $self->get_entries(
-startindex => $index,
-endindex => $index,
@ -1872,8 +1989,9 @@ sub get_snmp_table_objects {
$result->{$key} = $value;
}
}
@entries = $self->make_symbolic($mib, $result, $indices, $sym_lookup);
@entries = map { $_->{indices} = shift @{$indices}; $_ } @entries;
@entries = map {
$_->{indices} = shift @{$indices}; $_
} $self->make_symbolic($mib, $result, $indices, $sym_lookup);
$self->debug(sprintf "get_snmp_table_objects single returns %d entries",
scalar(@entries));
} elsif (scalar(@{$indices}) > 1) {
@ -1885,11 +2003,36 @@ sub get_snmp_table_objects {
# holzweg. dicke ciscos liefern unvollstaendiges resultat, d.h.
# bei 138,19,157 kommt nur 138..144, dann ist schluss.
# maxrepetitions bringt nichts.
$result = $self->get_entries(
-startindex => $startindex,
-endindex => $endindex,
-columns => \@columns,
);
#$result = $self->get_entries(
# -startindex => $startindex,
# -endindex => $endindex,
# -columns => \@columns,
#);
# anderer ansatz. zusammenhaengende sequenzen suchen und dann
# mehrere bulkwalks absetzen. bringt aber nichts, wenn die indices
# wild verstreut sind
my @sequences = ();
my $sequence;
foreach my $idx (0..scalar(@sortedindices)-1) {
if ($idx != 0 && $sortedindices[$idx] == $sortedindices[$idx-1]+1) {
push(@{$sequence}, $sortedindices[$idx]);
} else {
$sequence = [$sortedindices[$idx]];
push(@sequences, $sequence);
}
}
foreach my $sequence (@sequences) {
my $startindex = $sequence->[0];
my $endindex = $sequence->[-1];
my $tmp_result = $self->get_entries(
-startindex => $startindex,
-endindex => $endindex,
-columns => \@columns,
);
while (my ($key, $value) = each %{$tmp_result}) {
$result->{$key} = $value;
}
}
} else {
foreach my $idx (@sortedindices) {
my $tmp_result = $self->get_entries(
@ -1902,7 +2045,8 @@ sub get_snmp_table_objects {
}
}
}
if ($augmenting_table) {
foreach (@augmenting) {
my($augmenting_tableoid, @augmenting_columns) = ($_->[0], @{$_->[1]});
foreach my $idx (@sortedindices) {
my $tmp_result = $self->get_entries(
-startindex => $idx,
@ -1916,15 +2060,17 @@ sub get_snmp_table_objects {
}
# now we have numerical_oid+index => value
# needs to become symboic_oid => value
@entries = $self->make_symbolic($mib, $result, $indices, $sym_lookup);
@entries = map { $_->{indices} = shift @{$indices}; $_ } @entries;
@entries = map {
$_->{indices} = shift @{$indices}; $_
} $self->make_symbolic($mib, $result, $indices, $sym_lookup);
$self->debug(sprintf "get_snmp_table_objects single returns %d entries",
scalar(@entries));
} elsif (scalar(@{$rows})) {
my $result = $self->get_entries(
-columns => \@columns,
);
if ($augmenting_table) {
foreach (@augmenting) {
my($augmenting_tableoid, @augmenting_columns) = ($_->[0], @{$_->[1]});
my $augmenting_result = $self->get_entries(
-columns => \@augmenting_columns,
);
@ -1936,18 +2082,17 @@ sub get_snmp_table_objects {
$self->get_indices(
-baseoid => $entryoid,
-oids => [keys %{$result}]);
@entries = $self->make_symbolic($mib, $result, \@indices, $sym_lookup);
@entries = map { $_->{indices} = shift @indices; $_ } @entries;
@entries = map {
$_->{indices} = shift @indices; $_
} $self->make_symbolic($mib, $result, \@indices, $sym_lookup);
$self->debug(sprintf "get_snmp_table_objects rows returns %d entries",
scalar(@entries));
} else {
my $result = $self->get_table(
-baseoid => $tableoid,
);
if ($augmenting_table) {
#my $augmenting_result = $self->get_entries(
# -columns => \@augmenting_columns,
#);
foreach (@augmenting) {
my($augmenting_tableoid, @augmenting_columns) = ($_->[0], @{$_->[1]});
my $augmenting_result = $self->get_table(
-baseoid => $augmenting_tableoid,
);
@ -1961,8 +2106,9 @@ sub get_snmp_table_objects {
$self->get_indices(
-baseoid => $entryoid,
-oids => [keys %{$result}]);
@entries = $self->make_symbolic($mib, $result, \@indices, $sym_lookup);
@entries = map { $_->{indices} = shift @indices; $_ } @entries;
@entries = map {
$_->{indices} = shift @indices; $_
} $self->make_symbolic($mib, $result, \@indices, $sym_lookup);
$self->debug(sprintf "get_snmp_table_objects default returns %d entries",
scalar(@entries));
}
@ -1970,12 +2116,6 @@ sub get_snmp_table_objects {
return @entries;
}
sub bulk_is_baeh {
my ($self, $maxrepetitions) = @_;
$maxrepetitions ||= 1;
$Monitoring::GLPlugin::SNMP::maxrepetitions = $maxrepetitions;
}
################################################################
# 3rd level functions. calling net::snmp-functions
#
@ -2033,18 +2173,23 @@ sub get_request {
sub get_entries_get_bulk {
my ($self, %params) = @_;
my $result = {};
$self->debug(sprintf "get_entries_get_bulk %s", Data::Dumper::Dumper(\%params));
my %newparams = ();
$newparams{'-maxrepetitions'} = 3;
$newparams{'-startindex'} = $params{'-startindex'}
if defined $params{'-startindex'};
$newparams{'-endindex'} = $params{'-endindex'}
if defined $params{'-endindex'};
$newparams{'-columns'} = $params{'-columns'};
if ($Monitoring::GLPlugin::SNMP::maxrepetitions) {
$newparams{'-maxrepetitions'} = $Monitoring::GLPlugin::SNMP::maxrepetitions;
} else {
$newparams{'-maxrepetitions'} = 3;
}
$self->debug(sprintf "get_entries_get_bulk %s", Data::Dumper::Dumper(\%newparams));
if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
$newparams{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
$newparams{-contextname} = $self->opts->contextname if $self->opts->contextname;
}
delete $newparams{'-maxrepetitions'}; # bulk howe gsagt!!
$result = $Monitoring::GLPlugin::SNMP::session->get_entries(%newparams);
return $result;
}
@ -2052,7 +2197,6 @@ sub get_entries_get_bulk {
sub get_entries_get_next {
my ($self, %params) = @_;
my $result = {};
$self->debug(sprintf "get_entries_get_next %s", Data::Dumper::Dumper(\%params));
my %newparams = ();
$newparams{'-maxrepetitions'} = 0;
$newparams{'-startindex'} = $params{'-startindex'}
@ -2060,6 +2204,7 @@ sub get_entries_get_next {
$newparams{'-endindex'} = $params{'-endindex'}
if defined $params{'-endindex'};
$newparams{'-columns'} = $params{'-columns'};
$self->debug(sprintf "get_entries_get_next %s", Data::Dumper::Dumper(\%newparams));
if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
$newparams{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
$newparams{-contextname} = $self->opts->contextname if $self->opts->contextname;
@ -2071,13 +2216,13 @@ sub get_entries_get_next {
sub get_entries_get_next_1index {
my ($self, %params) = @_;
my $result = {};
$self->debug(sprintf "get_entries_get_next_1index %s", Data::Dumper::Dumper(\%params));
my %newparams = ();
$newparams{'-startindex'} = $params{'-startindex'}
if defined $params{'-startindex'};
$newparams{'-endindex'} = $params{'-endindex'}
if defined $params{'-endindex'};
$newparams{'-columns'} = $params{'-columns'};
$self->debug(sprintf "get_entries_get_next_1index %s", Data::Dumper::Dumper(\%newparams));
my %singleparams = ();
$singleparams{'-maxrepetitions'} = 0;
if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
@ -2101,13 +2246,13 @@ sub get_entries_get_next_1index {
sub get_entries_get_simple {
my ($self, %params) = @_;
my $result = {};
$self->debug(sprintf "get_entries_get_simple %s", Data::Dumper::Dumper(\%params));
my %newparams = ();
$newparams{'-startindex'} = $params{'-startindex'}
if defined $params{'-startindex'};
$newparams{'-endindex'} = $params{'-endindex'}
if defined $params{'-endindex'};
$newparams{'-columns'} = $params{'-columns'};
$self->debug(sprintf "get_entries_get_simple %s", Data::Dumper::Dumper(\%newparams));
my %singleparams = ();
if ($Monitoring::GLPlugin::SNMP::session->version() == 3) {
$singleparams{-contextengineid} = $self->opts->contextengineid if $self->opts->contextengineid;
@ -2149,12 +2294,23 @@ sub get_entries {
# The message size exceeded the buffer maxMsgSize of (\d+)
# Message size exceeded buffer maxMsgSize
if ($Monitoring::GLPlugin::SNMP::session->error() =~ /message size exceeded.*buffer maxMsgSize/i) {
$self->debug(sprintf "buffer exceeded. raise *5 for next try");
# old methos. might be no good idea for wan
#$self->debug(sprintf "buffer exceeded. raise *5 for next try");
#$self->mult_snmp_max_msg_size(5);
$self->debug(sprintf "buffer exceeded. lower repetitions for next try");
$self->bulk_is_baeh($self->get_max_repetitions() * 0.75);
} elsif ($Monitoring::GLPlugin::SNMP::session->error() =~ /Authentication failure/ && $Monitoring::GLPlugin::SNMP::session->max_msg_size() > 10) {
$self->debug("A so a Rimbfiech, so a saudumms. Aaf oamol kennda me nimmer");
# australische Nexus. Bulkwalk mit hochgedrehten max_repetitions (*128)
# fuehrt so so einem fake Authentication failure
$self->mult_snmp_max_msg_size(5);
$result = $self->get_entries(%params);
} else {
$self->debug($Monitoring::GLPlugin::SNMP::session->error());
}
if (defined $params{'-endindex'} && defined $params{'-startindex'}) {
if ($result) {
# Rimbfiech fallback was successful
} elsif (defined $params{'-endindex'} && defined $params{'-startindex'}) {
$result = $self->get_entries_get_simple(%params);
} else {
$result = $self->get_entries_get_next(%params);
@ -2282,6 +2438,9 @@ sub get_entries_by_walk {
while (my $result = $Monitoring::GLPlugin::SNMP::session->get_bulk_request(%params)) {
my @names = $Monitoring::GLPlugin::SNMP::session->var_bind_names();
my @oids = $self->sort_oids(\@names);
foreach (keys %{$result}) {
$self->add_rawdata($_, $result->{$_});
}
$params{-varbindlist} = [pop @oids];
}
}
@ -2294,6 +2453,8 @@ sub get_entries_by_walk {
sub get_table {
my ($self, %params) = @_;
my $tic;
my $tac;
$self->add_oidtrace($params{'-baseoid'});
if (! $self->opts->snmpwalk) {
my @notcached = ();
@ -2307,10 +2468,13 @@ sub get_table {
$params{'-maxrepetitions'} = $Monitoring::GLPlugin::SNMP::maxrepetitions;
}
$self->debug(sprintf "get_table %s", Data::Dumper::Dumper(\%params));
$tic = time;
my $result = $Monitoring::GLPlugin::SNMP::session->get_table(%params);
$tac = time;
if (! defined $result || (defined $result && ! %{$result})) {
$self->debug(sprintf "get_table error: %s",
$Monitoring::GLPlugin::SNMP::session->error());
my $fallback = 0;
if ($Monitoring::GLPlugin::SNMP::session->error() =~ /message size exceeded.*buffer maxMsgSize/i) {
# bei irrsinnigen maxrepetitions
$self->debug(sprintf "buffer exceeded");
@ -2322,11 +2486,24 @@ sub get_table {
} else {
$self->mult_snmp_max_msg_size(2);
}
$fallback = 1;
} elsif ($Monitoring::GLPlugin::SNMP::session->error() =~ /No response from remote host/i) {
# some agents can not handle big loads
if ($params{'-maxrepetitions'}) {
$params{'-maxrepetitions'} = int($params{'-maxrepetitions'} / 2);
$self->debug(sprintf "reduce maxrepetitions to %d",
$params{'-maxrepetitions'});
$fallback = 1;
}
}
if ($fallback) {
$self->debug("get_table error: try fallback");
$self->debug(sprintf "get_table %s", Data::Dumper::Dumper(\%params));
$tic = time;
$result = $Monitoring::GLPlugin::SNMP::session->get_table(%params);
$tac = time;
$self->debug(sprintf "get_table returned %d oids in %ds", scalar(keys %{$result}), $tac - $tic);
}
$self->debug("get_table error: try fallback");
$self->debug(sprintf "get_table %s", Data::Dumper::Dumper(\%params));
$result = $Monitoring::GLPlugin::SNMP::session->get_table(%params);
$self->debug(sprintf "get_table returned %d oids", scalar(keys %{$result}));
if (! defined $result || ! %{$result}) {
$self->debug(sprintf "get_table error: %s",
$Monitoring::GLPlugin::SNMP::session->error());
@ -2334,8 +2511,10 @@ sub get_table {
$params{'-maxrepetitions'} = 1;
$self->debug("get_table error: try getnext fallback");
$self->debug(sprintf "get_table %s", Data::Dumper::Dumper(\%params));
$tic = time;
$result = $Monitoring::GLPlugin::SNMP::session->get_table(%params);
$self->debug(sprintf "get_table returned %d oids", scalar(keys %{$result}));
$tac = time;
$self->debug(sprintf "get_table returned %d oids in %ds", scalar(keys %{$result}), $tac - $tic);
}
if (! defined $result || ! %{$result}) {
$self->debug("get_table error: no more fallbacks. Try --protocol 1");
@ -2356,7 +2535,7 @@ sub get_table {
$self->add_rawdata($key, $value);
}
}
$self->debug(sprintf "get_table returned %d oids", $num_rows);
$self->debug(sprintf "get_table returned %d oids in %ds", $num_rows, $tac - $tic);
foreach my $key (@blank_keys) {
my $value = $result->{$key};
delete $result->{$key};
@ -2413,6 +2592,7 @@ sub get_symbol {
# LgpEnvTemperatureMeasurementDegC = '1.3.6.1.4.1.476.1.42.3.4.1.1.4'
# der name des temp. sensor wird ueber die oid mitgeteilt
$self->require_mib($mib);
$oid =~ s/^\.//g;
foreach my $symoid
(keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}}) {
if ($oid eq $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid}) {
@ -2493,19 +2673,23 @@ sub make_symbolic {
exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition} &&
ref($Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}) eq 'CODE') {
if ($parameters) {
if (! exists $mo->{$parameters}) {
# this happens if there are two isolated get_snmp_object calls, one for
# cLHaPeerIpAddressType and one for cLHaPeerIpAddress where the latter needs
# the symbolized value of the first. we are inside this index-loop because
# both have this usual extra .0 although this is not a table row.
# if this were a table row, $mo would know cLHaPeerIpAddressType.
# there's a chance that $self got cLHaPeerIpAddressType in a previous call
# to make_symbolic
if (@{$indices} and scalar(@{$indices}) == 1 and ! $indices->[0]->[0]) {
$mo->{$parameters} = $self->{$parameters};
my @args = ($result->{$fulloid});
foreach my $parameter (split(",", $parameters)) {
if (! exists $mo->{$parameter}) {
# this happens if there are two isolated get_snmp_object calls, one for
# cLHaPeerIpAddressType and one for cLHaPeerIpAddress where the latter needs
# the symbolized value of the first. we are inside this index-loop because
# both have this usual extra .0 although this is not a table row.
# if this were a table row, $mo would know cLHaPeerIpAddressType.
# there's a chance that $self got cLHaPeerIpAddressType in a previous call
# to make_symbolic
if (@{$indices} and scalar(@{$indices}) == 1 and ! $indices->[0]->[0]) {
$mo->{$parameter} = $self->{$parameter};
}
}
push(@args, $mo->{$parameter});
}
$mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->($result->{$fulloid}, $mo->{$parameters});
$mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->(@args);
} else {
$mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->($result->{$fulloid});
}
@ -2573,12 +2757,16 @@ sub make_symbolic {
exists $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition} &&
ref($Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}) eq 'CODE') {
if ($parameters) {
if (! exists $mo->{$parameters}) {
if (@{$indices} and scalar(@{$indices}) == 1 and ! $indices->[0]->[0]) {
$mo->{$parameters} = $self->{$parameters};
my @args = ($result->{$fulloid});
foreach my $parameter (split(",", $parameters)) {
if (! exists $mo->{$parameter}) {
if (@{$indices} and scalar(@{$indices}) == 1 and ! $indices->[0]->[0]) {
$mo->{$parameter} = $self->{$parameter};
}
}
push(@args, $mo->{$parameter});
}
$mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->($result->{$fulloid}, $mo->{$parameters});
$mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->(@args);
} else {
$mo->{$symoid} = $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{$mib}->{$definition}->($result->{$fulloid});
}
@ -2605,8 +2793,13 @@ sub make_symbolic {
}
if (@{$indices} and scalar(@{$indices}) == 1 and !defined $indices->[0]->[0]) {
my $mo = {};
foreach my $symoid
(keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}}) {
my @lookup_keys = ();
if (! $sym_lookup) {
@lookup_keys = keys %{$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}};
} else {
@lookup_keys = values %{$sym_lookup};
}
foreach my $symoid (@lookup_keys) {
my $oid = $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid};
if (ref($oid) ne 'HASH') {
if (exists $result->{$oid}) {
@ -2649,6 +2842,8 @@ sub make_symbolic {
$mo->{$symoid} = 'unknown_'.$result->{$oid};
# oder $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{$mib}->{$symoid.'Definition'}?
}
} else {
$mo->{$symoid} = $result->{$oid};
}
}
}

View file

@ -0,0 +1,101 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::ADONISDNSMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'ADONIS-DNS-MIB'} = {
url => '',
name => 'ADONIS-DNS-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'ADONIS-DNS-MIB'} =
'1.3.6.1.4.1.13315.100.101';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'ADONIS-DNS-MIB'} = {
'adonis' => '1.3.6.1.4.1.13315.100.101',
'adonisObjects' => '1.3.6.1.4.1.13315.100.101.1',
'dns' => '1.3.6.1.4.1.13315.100.101.1.1',
'dnsDaemon' => '1.3.6.1.4.1.13315.100.101.1.1.1',
'dnsDaemonRunning' => '1.3.6.1.4.1.13315.100.101.1.1.1.1',
'dnsDaemonNumberOfZones' => '1.3.6.1.4.1.13315.100.101.1.1.1.2',
'dnsDaemonDebugLevel' => '1.3.6.1.4.1.13315.100.101.1.1.1.3',
'dnsDaemonZoneTransfersInProgress' => '1.3.6.1.4.1.13315.100.101.1.1.1.4',
'dnsDaemonZoneTransfersDeferred' => '1.3.6.1.4.1.13315.100.101.1.1.1.5',
'dnsDaemonSOAQueriesInProgress' => '1.3.6.1.4.1.13315.100.101.1.1.1.6',
'dnsDaemonQueryLoggingState' => '1.3.6.1.4.1.13315.100.101.1.1.1.7',
'dnsDaemonZoneTransferFailure' => '1.3.6.1.4.1.13315.100.101.1.1.1.8',
'dnsStats' => '1.3.6.1.4.1.13315.100.101.1.1.2',
'dnsStatsSuccess' => '1.3.6.1.4.1.13315.100.101.1.1.2.1',
'dnsStatsReferral' => '1.3.6.1.4.1.13315.100.101.1.1.2.2',
'dnsStatsNXRRSet' => '1.3.6.1.4.1.13315.100.101.1.1.2.3',
'dnsStatsNXDomain' => '1.3.6.1.4.1.13315.100.101.1.1.2.4',
'dnsStatsRecursion' => '1.3.6.1.4.1.13315.100.101.1.1.2.5',
'dnsStatsFailure' => '1.3.6.1.4.1.13315.100.101.1.1.2.6',
'dhcp' => '1.3.6.1.4.1.13315.100.101.1.2',
'dhcpDaemon' => '1.3.6.1.4.1.13315.100.101.1.2.1',
'dhcpDaemonRunning' => '1.3.6.1.4.1.13315.100.101.1.2.1.1',
'dhcpDaemonSubnetAlert' => '1.3.6.1.4.1.13315.100.101.1.2.1.2',
'dhcpDaemonLeaseStatsSuccess' => '1.3.6.1.4.1.13315.100.101.1.2.1.3',
'dhcpFailOverState' => '1.3.6.1.4.1.13315.100.101.1.2.1.4',
'dhcpStats' => '1.3.6.1.4.1.13315.100.101.1.2.2',
'dhcpLeaseTable' => '1.3.6.1.4.1.13315.100.101.1.2.2.1',
'dhcpLeaseEntry' => '1.3.6.1.4.1.13315.100.101.1.2.2.1.1',
'dhcpIP' => '1.3.6.1.4.1.13315.100.101.1.2.2.1.1.1',
'dhcpLeaseStartTime' => '1.3.6.1.4.1.13315.100.101.1.2.2.1.1.2',
'dhcpLeaseEndTime' => '1.3.6.1.4.1.13315.100.101.1.2.2.1.1.3',
'dhcpLeaseTimeStamp' => '1.3.6.1.4.1.13315.100.101.1.2.2.1.1.4',
'dhcpLeaseBindState' => '1.3.6.1.4.1.13315.100.101.1.2.2.1.1.5',
'dhcpLeaseBindStateDefinition' => 'ADONIS-DNS-MIB::dhcpLeaseBindState',
'dhcpLeaseHardwareAddress' => '1.3.6.1.4.1.13315.100.101.1.2.2.1.1.6',
'dhcpLeaseHostname' => '1.3.6.1.4.1.13315.100.101.1.2.2.1.1.7',
'dhcpSubnetTable' => '1.3.6.1.4.1.13315.100.101.1.2.2.2',
'dhcpSubnetEntry' => '1.3.6.1.4.1.13315.100.101.1.2.2.2.1',
'dhcpSubnetIP' => '1.3.6.1.4.1.13315.100.101.1.2.2.2.1.1',
'dhcpSubnetMask' => '1.3.6.1.4.1.13315.100.101.1.2.2.2.1.2',
'dhcpSubnetSize' => '1.3.6.1.4.1.13315.100.101.1.2.2.2.1.3',
'dhcpSubnetUsed' => '1.3.6.1.4.1.13315.100.101.1.2.2.2.1.4',
'dhcpSubnetAlert' => '1.3.6.1.4.1.13315.100.101.1.2.2.2.1.5',
'dhcpPoolTable' => '1.3.6.1.4.1.13315.100.101.1.2.2.3',
'dhcpPoolEntry' => '1.3.6.1.4.1.13315.100.101.1.2.2.3.1',
'dhcpPoolSubnetIP' => '1.3.6.1.4.1.13315.100.101.1.2.2.3.1.1',
'dhcpPoolStartIP' => '1.3.6.1.4.1.13315.100.101.1.2.2.3.1.2',
'dhcpPoolEndIP' => '1.3.6.1.4.1.13315.100.101.1.2.2.3.1.3',
'dhcpPoolSize' => '1.3.6.1.4.1.13315.100.101.1.2.2.3.1.4',
'dhcpPoolUsed' => '1.3.6.1.4.1.13315.100.101.1.2.2.3.1.5',
'dhcpPoolAlert' => '1.3.6.1.4.1.13315.100.101.1.2.2.3.1.6',
'dhcpConfig' => '1.3.6.1.4.1.13315.100.101.1.2.3',
'dhcpFixedIPTable' => '1.3.6.1.4.1.13315.100.101.1.2.3.1',
'dhcpFixedIPEntry' => '1.3.6.1.4.1.13315.100.101.1.2.3.1.1',
'dhcpFixedIP' => '1.3.6.1.4.1.13315.100.101.1.2.3.1.1.1',
'ha' => '1.3.6.1.4.1.13315.100.101.1.3',
'haService' => '1.3.6.1.4.1.13315.100.101.1.3.1',
'haServiceRunning' => '1.3.6.1.4.1.13315.100.101.1.3.1.1',
'haServiceNodeType' => '1.3.6.1.4.1.13315.100.101.1.3.1.2',
'haReplicationBinding' => '1.3.6.1.4.1.13315.100.101.1.3.1.3',
'commandServer' => '1.3.6.1.4.1.13315.100.101.1.4',
'commandServerDaemon' => '1.3.6.1.4.1.13315.100.101.1.4.1',
'commandServerDaemonRunning' => '1.3.6.1.4.1.13315.100.101.1.4.1.1',
'lcd' => '1.3.6.1.4.1.13315.100.101.1.5',
'lcdDaemon' => '1.3.6.1.4.1.13315.100.101.1.5.1',
'licenseValid' => '1.3.6.1.4.1.13315.100.101.1.5.1.1',
'licenseExpiry' => '1.3.6.1.4.1.13315.100.101.1.5.1.2',
'tftp' => '1.3.6.1.4.1.13315.100.101.1.6',
'tftpDaemon' => '1.3.6.1.4.1.13315.100.101.1.6.1',
'tftpDaemonRunning' => '1.3.6.1.4.1.13315.100.101.1.6.1.1',
'system' => '1.3.6.1.4.1.13315.100.101.1.7',
'systemDaemon' => '1.3.6.1.4.1.13315.100.101.1.7.1',
'systemState' => '1.3.6.1.4.1.13315.100.101.1.7.1.1',
'adonisTraps' => '1.3.6.1.4.1.13315.100.101.2',
'trapDNS' => '1.3.6.1.4.1.13315.100.101.2.1',
'trapHA' => '1.3.6.1.4.1.13315.100.101.2.2',
'trapCommandServer' => '1.3.6.1.4.1.13315.100.101.2.3',
'trapDHCP' => '1.3.6.1.4.1.13315.100.101.2.4',
'trapReplication' => '1.3.6.1.4.1.13315.100.101.2.5',
'trapTFTP' => '1.3.6.1.4.1.13315.100.101.2.6',
'trapSystem' => '1.3.6.1.4.1.13315.100.101.2.7',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'ADONIS-DNS-MIB'} = {
'dhcpLeaseBindState' => {
'0' => 'free',
'1' => 'active',
'2' => 'fixed',
},
};

View file

@ -0,0 +1,159 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::ARISTABGP4V2MIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'ARISTA-BGP4V2-MIB'} = {
url => '',
name => 'ARISTA-BGP4V2-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'ARISTA-BGP4V2-MIB'} =
'1.3.6.1.4.1.30065.4.1';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'ARISTA-BGP4V2-MIB'} = {
aristaBgp4V2 => '1.3.6.1.4.1.30065.4.1',
aristaBgp4V2Notifications => '1.3.6.1.4.1.30065.4.1.0',
aristaBgp4V2Objects => '1.3.6.1.4.1.30065.4.1.1',
aristaBgp4V2DiscontinuityTable => '1.3.6.1.4.1.30065.4.1.1.1',
aristaBgp4V2DiscontinuityEntry => '1.3.6.1.4.1.30065.4.1.1.1.1',
aristaBgp4V2DiscontinuityTime => '1.3.6.1.4.1.30065.4.1.1.1.1.1',
aristaBgp4V2PeerTable => '1.3.6.1.4.1.30065.4.1.1.2',
aristaBgp4V2PeerEntry => '1.3.6.1.4.1.30065.4.1.1.2.1',
aristaBgp4V2PeerInstance => '1.3.6.1.4.1.30065.4.1.1.2.1.1',
aristaBgp4V2PeerLocalAddrType => '1.3.6.1.4.1.30065.4.1.1.2.1.2',
aristaBgp4V2PeerLocalAddrTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
aristaBgp4V2PeerLocalAddr => '1.3.6.1.4.1.30065.4.1.1.2.1.3',
aristaBgp4V2PeerLocalAddrDefinition => 'INET-ADDRESS-MIB::InetAddress(aristaBgp4V2PeerLocalAddrType)',
aristaBgp4V2PeerRemoteAddrType => '1.3.6.1.4.1.30065.4.1.1.2.1.4',
aristaBgp4V2PeerRemoteAddrTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
aristaBgp4V2PeerRemoteAddr => '1.3.6.1.4.1.30065.4.1.1.2.1.5',
aristaBgp4V2PeerRemoteAddrDefinition => 'INET-ADDRESS-MIB::InetAddress(aristaBgp4V2PeerRemoteAddrType)',
aristaBgp4V2PeerLocalPort => '1.3.6.1.4.1.30065.4.1.1.2.1.6',
aristaBgp4V2PeerLocalAs => '1.3.6.1.4.1.30065.4.1.1.2.1.7',
aristaBgp4V2PeerLocalIdentifier => '1.3.6.1.4.1.30065.4.1.1.2.1.8',
aristaBgp4V2PeerLocalIdentifierDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2IdentifierTC',
aristaBgp4V2PeerRemotePort => '1.3.6.1.4.1.30065.4.1.1.2.1.9',
aristaBgp4V2PeerRemoteAs => '1.3.6.1.4.1.30065.4.1.1.2.1.10',
aristaBgp4V2PeerRemoteIdentifier => '1.3.6.1.4.1.30065.4.1.1.2.1.11',
aristaBgp4V2PeerRemoteIdentifierDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2IdentifierTC',
aristaBgp4V2PeerAdminStatus => '1.3.6.1.4.1.30065.4.1.1.2.1.12',
aristaBgp4V2PeerAdminStatusDefinition => 'ARISTA-BGP4V2-MIB::aristaBgp4V2PeerAdminStatus',
aristaBgp4V2PeerState => '1.3.6.1.4.1.30065.4.1.1.2.1.13',
aristaBgp4V2PeerStateDefinition => 'ARISTA-BGP4V2-MIB::aristaBgp4V2PeerState',
aristaBgp4V2PeerDescription => '1.3.6.1.4.1.30065.4.1.1.2.1.14',
aristaBgp4V2PeerErrorsTable => '1.3.6.1.4.1.30065.4.1.1.3',
aristaBgp4V2PeerErrorsEntry => '1.3.6.1.4.1.30065.4.1.1.3.1',
aristaBgp4V2PeerLastErrorCodeReceived => '1.3.6.1.4.1.30065.4.1.1.3.1.1',
aristaBgp4V2PeerLastErrorSubCodeReceived => '1.3.6.1.4.1.30065.4.1.1.3.1.2',
aristaBgp4V2PeerLastErrorReceivedTime => '1.3.6.1.4.1.30065.4.1.1.3.1.3',
aristaBgp4V2PeerLastErrorReceivedText => '1.3.6.1.4.1.30065.4.1.1.3.1.4',
aristaBgp4V2PeerLastErrorReceivedData => '1.3.6.1.4.1.30065.4.1.1.3.1.5',
aristaBgp4V2PeerLastErrorCodeSent => '1.3.6.1.4.1.30065.4.1.1.3.1.6',
aristaBgp4V2PeerLastErrorSubCodeSent => '1.3.6.1.4.1.30065.4.1.1.3.1.7',
aristaBgp4V2PeerLastErrorSentTime => '1.3.6.1.4.1.30065.4.1.1.3.1.8',
aristaBgp4V2PeerLastErrorSentText => '1.3.6.1.4.1.30065.4.1.1.3.1.9',
aristaBgp4V2PeerLastErrorSentData => '1.3.6.1.4.1.30065.4.1.1.3.1.10',
aristaBgp4V2PeerEventTimesTable => '1.3.6.1.4.1.30065.4.1.1.4',
aristaBgp4V2PeerEventTimesEntry => '1.3.6.1.4.1.30065.4.1.1.4.1',
aristaBgp4V2PeerFsmEstablishedTime => '1.3.6.1.4.1.30065.4.1.1.4.1.1',
aristaBgp4V2PeerInUpdatesElapsedTime => '1.3.6.1.4.1.30065.4.1.1.4.1.2',
aristaBgp4V2PeerConfiguredTimersTable => '1.3.6.1.4.1.30065.4.1.1.5',
aristaBgp4V2PeerConfiguredTimersEntry => '1.3.6.1.4.1.30065.4.1.1.5.1',
aristaBgp4V2PeerConnectRetryInterval => '1.3.6.1.4.1.30065.4.1.1.5.1.1',
aristaBgp4V2PeerHoldTimeConfigured => '1.3.6.1.4.1.30065.4.1.1.5.1.2',
aristaBgp4V2PeerKeepAliveConfigured => '1.3.6.1.4.1.30065.4.1.1.5.1.3',
aristaBgp4V2PeerMinASOrigInterval => '1.3.6.1.4.1.30065.4.1.1.5.1.4',
aristaBgp4V2PeerMinRouteAdverInterval => '1.3.6.1.4.1.30065.4.1.1.5.1.5',
aristaBgp4V2PeerNegotiatedTimersTable => '1.3.6.1.4.1.30065.4.1.1.6',
aristaBgp4V2PeerNegotiatedTimersEntry => '1.3.6.1.4.1.30065.4.1.1.6.1',
aristaBgp4V2PeerHoldTime => '1.3.6.1.4.1.30065.4.1.1.6.1.1',
aristaBgp4V2PeerKeepAlive => '1.3.6.1.4.1.30065.4.1.1.6.1.2',
aristaBgp4V2PeerCountersTable => '1.3.6.1.4.1.30065.4.1.1.7',
aristaBgp4V2PeerCountersEntry => '1.3.6.1.4.1.30065.4.1.1.7.1',
aristaBgp4V2PeerInUpdates => '1.3.6.1.4.1.30065.4.1.1.7.1.1',
aristaBgp4V2PeerOutUpdates => '1.3.6.1.4.1.30065.4.1.1.7.1.2',
aristaBgp4V2PeerInTotalMessages => '1.3.6.1.4.1.30065.4.1.1.7.1.3',
aristaBgp4V2PeerOutTotalMessages => '1.3.6.1.4.1.30065.4.1.1.7.1.4',
aristaBgp4V2PeerFsmEstablishedTransitions => '1.3.6.1.4.1.30065.4.1.1.7.1.5',
aristaBgp4V2PrefixGaugesTable => '1.3.6.1.4.1.30065.4.1.1.8',
aristaBgp4V2PrefixGaugesEntry => '1.3.6.1.4.1.30065.4.1.1.8.1',
aristaBgp4V2PrefixGaugesAfi => '1.3.6.1.4.1.30065.4.1.1.8.1.1',
aristaBgp4V2PrefixGaugesAfiDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2AddressFamilyIdentifierTC',
aristaBgp4V2PrefixGaugesSafi => '1.3.6.1.4.1.30065.4.1.1.8.1.2',
aristaBgp4V2PrefixGaugesSafiDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2SubsequentAddressFamilyIdentifierTC',
aristaBgp4V2PrefixInPrefixes => '1.3.6.1.4.1.30065.4.1.1.8.1.3',
aristaBgp4V2PrefixInPrefixesAccepted => '1.3.6.1.4.1.30065.4.1.1.8.1.4',
aristaBgp4V2PrefixOutPrefixes => '1.3.6.1.4.1.30065.4.1.1.8.1.5',
aristaBgp4V2NlriTable => '1.3.6.1.4.1.30065.4.1.1.9',
aristaBgp4V2NlriEntry => '1.3.6.1.4.1.30065.4.1.1.9.1',
aristaBgp4V2NlriIndex => '1.3.6.1.4.1.30065.4.1.1.9.1.1',
aristaBgp4V2NlriAfi => '1.3.6.1.4.1.30065.4.1.1.9.1.2',
aristaBgp4V2NlriAfiDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2AddressFamilyIdentifierTC',
aristaBgp4V2NlriSafi => '1.3.6.1.4.1.30065.4.1.1.9.1.3',
aristaBgp4V2NlriSafiDefinition => 'ARISTA-BGP4V2-TC-MIB::AristaBgp4V2SubsequentAddressFamilyIdentifierTC',
aristaBgp4V2NlriPrefixType => '1.3.6.1.4.1.30065.4.1.1.9.1.4',
aristaBgp4V2NlriPrefix => '1.3.6.1.4.1.30065.4.1.1.9.1.5',
aristaBgp4V2NlriPrefixLen => '1.3.6.1.4.1.30065.4.1.1.9.1.6',
aristaBgp4V2NlriBest => '1.3.6.1.4.1.30065.4.1.1.9.1.7',
aristaBgp4V2NlriCalcLocalPref => '1.3.6.1.4.1.30065.4.1.1.9.1.8',
aristaBgp4V2NlriOrigin => '1.3.6.1.4.1.30065.4.1.1.9.1.9',
aristaBgp4V2NlriOriginDefinition => 'ARISTA-BGP4V2-MIB::aristaBgp4V2NlriOrigin',
aristaBgp4V2NlriNextHopAddrType => '1.3.6.1.4.1.30065.4.1.1.9.1.10',
aristaBgp4V2NlriNextHopAddr => '1.3.6.1.4.1.30065.4.1.1.9.1.11',
aristaBgp4V2NlriLinkLocalNextHopAddrType => '1.3.6.1.4.1.30065.4.1.1.9.1.12',
aristaBgp4V2NlriLinkLocalNextHopAddr => '1.3.6.1.4.1.30065.4.1.1.9.1.13',
aristaBgp4V2NlriLocalPrefPresent => '1.3.6.1.4.1.30065.4.1.1.9.1.14',
aristaBgp4V2NlriLocalPref => '1.3.6.1.4.1.30065.4.1.1.9.1.15',
aristaBgp4V2NlriMedPresent => '1.3.6.1.4.1.30065.4.1.1.9.1.16',
aristaBgp4V2NlriMed => '1.3.6.1.4.1.30065.4.1.1.9.1.17',
aristaBgp4V2NlriAtomicAggregate => '1.3.6.1.4.1.30065.4.1.1.9.1.18',
aristaBgp4V2NlriAggregatorPresent => '1.3.6.1.4.1.30065.4.1.1.9.1.19',
aristaBgp4V2NlriAggregatorAS => '1.3.6.1.4.1.30065.4.1.1.9.1.20',
aristaBgp4V2NlriAggregatorAddr => '1.3.6.1.4.1.30065.4.1.1.9.1.21',
aristaBgp4V2NlriAsPathCalcLength => '1.3.6.1.4.1.30065.4.1.1.9.1.22',
aristaBgp4V2NlriAsPathString => '1.3.6.1.4.1.30065.4.1.1.9.1.23',
aristaBgp4V2NlriAsPath => '1.3.6.1.4.1.30065.4.1.1.9.1.24',
aristaBgp4V2NlriPathAttrUnknown => '1.3.6.1.4.1.30065.4.1.1.9.1.25',
aristaBgp4V2AdjRibsOutTable => '1.3.6.1.4.1.30065.4.1.1.10',
aristaBgp4V2AdjRibsOutEntry => '1.3.6.1.4.1.30065.4.1.1.10.1',
aristaBgp4V2AdjRibsOutIndex => '1.3.6.1.4.1.30065.4.1.1.10.1.1',
aristaBgp4V2AdjRibsOutRoute => '1.3.6.1.4.1.30065.4.1.1.10.1.2',
aristaBgp4V2Conformance => '1.3.6.1.4.1.30065.4.1.2',
aristaBgp4V2Compliances => '1.3.6.1.4.1.30065.4.1.2.1',
aristaBgp4V2Groups => '1.3.6.1.4.1.30065.4.1.2.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'ARISTA-BGP4V2-MIB'} = {
aristaBgp4V2NlriOrigin => {
'1' => 'igp',
'2' => 'egp',
'3' => 'incomplete',
},
aristaBgp4V2PeerAdminStatus => {
'1' => 'halted',
'2' => 'running',
},
aristaBgp4V2PeerState => {
'1' => 'idle',
'2' => 'connect',
'3' => 'active',
'4' => 'opensent',
'5' => 'openconfirm',
'6' => 'established',
},
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'ARISTA-BGP4V2-TC-MIB'} = {
AristaBgp4V2IdentifierTC => sub {
my ($addr) = @_;
return Monitoring::GLPlugin::SNMP::TableItem->new()->unhex_ip($addr);
},
AristaBgp4V2AddressFamilyIdentifierTC => {
1 => 'ipv4',
2 => 'ipv6',
},
AristaBgp4V2SubsequentAddressFamilyIdentifierTC => {
1 => 'unicast',
2 => 'multicast',
4 => 'mpls',
},
};

View file

@ -0,0 +1,20 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::ARUBAWIREDCHASSISMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'ARUBAWIRED-CHASSIS-MIB'} = {
url => '',
name => 'ARUBAWIRED-CHASSIS-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'ARUBAWIRED-CHASSIS-MIB'} =
'1.3.6.1.4.1.47196.4.1.1.3.11';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'ARUBAWIRED-CHASSIS-MIB'} = {
'arubaWiredChassisMIB' => '1.3.6.1.4.1.47196.4.1.1.3.11',
'arubaWiredPowerSupply' => '1.3.6.1.4.1.47196.4.1.1.3.11.2',
'arubaWiredTempSensor' => '1.3.6.1.4.1.47196.4.1.1.3.11.3',
'arubaWiredFanTray' => '1.3.6.1.4.1.47196.4.1.1.3.11.4',
'arubaWiredFan' => '1.3.6.1.4.1.47196.4.1.1.3.11.5',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'ARUBAWIRED-CHASSIS-MIB'} = {
};

View file

@ -0,0 +1,31 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::ARUBAWIREDFANMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'ARUBAWIRED-FAN-MIB'} = {
url => '',
name => 'ARUBAWIRED-FAN-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'ARUBAWIRED-FAN-MIB'} =
'1.3.6.1.4.1.47196.4.1.1.3.11.5';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'ARUBAWIRED-FAN-MIB'} = {
'arubaWiredFan' => '1.3.6.1.4.1.47196.4.1.1.3.11.5',
'arubaWiredFanNotifications' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.0',
'arubaWiredFanTable' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.1',
'arubaWiredFanEntry' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1',
'arubaWiredFanGroupIndex' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.1',
'arubaWiredFanTrayIndex' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.2',
'arubaWiredFanSlotIndex' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.3',
'arubaWiredFanName' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.4',
'arubaWiredFanState' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.5',
'arubaWiredFanProductName' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.6',
'arubaWiredFanSerialNumber' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.7',
'arubaWiredFanRPM' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.8',
'arubaWiredFanAirflowDirection' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.1.1.9',
'arubaWiredFanConformance' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.99',
'arubaWiredFanCompliances' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.99.1',
'arubaWiredFanGroups' => '1.3.6.1.4.1.47196.4.1.1.3.11.5.99.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'ARUBAWIRED-FAN-MIB'} = {
};

View file

@ -0,0 +1,29 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::ARUBAWIREDFANTRAYMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'ARUBAWIRED-FANTRAY-MIB'} = {
url => '',
name => 'ARUBAWIRED-FANTRAY-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'ARUBAWIRED-FANTRAY-MIB'} =
'1.3.6.1.4.1.47196.4.1.1.3.11.4';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'ARUBAWIRED-FANTRAY-MIB'} = {
'arubaWiredFanTray' => '1.3.6.1.4.1.47196.4.1.1.3.11.4',
'arubaWiredFanTrayNotifications' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.0',
'arubaWiredFanTrayTable' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.1',
'arubaWiredFanTrayEntry' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1',
'arubaWiredFanTrayGroupIndex' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1.1',
'arubaWiredFanTraySlotIndex' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1.2',
'arubaWiredFanTrayName' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1.3',
'arubaWiredFanTrayState' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1.4',
'arubaWiredFanTrayProductName' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1.5',
'arubaWiredFanTraySerialNumber' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1.6',
'arubaWiredFanTrayNumberFans' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.1.1.7',
'arubaWiredFanTrayConformance' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.99',
'arubaWiredFanTrayCompliances' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.99.1',
'arubaWiredFanTrayGroups' => '1.3.6.1.4.1.47196.4.1.1.3.11.4.99.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'ARUBAWIRED-FANTRAY-MIB'} = {
};

View file

@ -0,0 +1,32 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::ARUBAWIREDPOWERSUPPLYMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'ARUBAWIRED-POWERSUPPLY-MIB'} = {
url => '',
name => 'ARUBAWIRED-POWERSUPPLY-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'ARUBAWIRED-POWERSUPPLY-MIB'} =
'1.3.6.1.4.1.47196.4.1.1.3.11.2';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'ARUBAWIRED-POWERSUPPLY-MIB'} = {
'arubaWiredPowerSupply' => '1.3.6.1.4.1.47196.4.1.1.3.11.2',
'arubaWiredPSUNotifications' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.0',
'arubaWiredPowerSupplyTable' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1',
'arubaWiredPowerSupplyEntry' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1',
'arubaWiredPSUGroupIndex' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.1',
'arubaWiredPSUSlotIndex' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.2',
'arubaWiredPSUName' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.3',
'arubaWiredPSUState' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.4',
'arubaWiredPSUProductName' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.5',
'arubaWiredPSUSerialNumber' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.6',
'arubaWiredPSUInstantaneousPower' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.7',
'arubaWiredPSUMaximumPower' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.8',
'arubaWiredPSUNumberFailures' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.9',
'arubaWiredPSUAirflowDirection' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.1.1.10',
'arubaWiredPowerSupplyConformance' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.99',
'arubaWiredPowerSupplyCompliances' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.99.1',
'arubaWiredPowerSupplyGroups' => '1.3.6.1.4.1.47196.4.1.1.3.11.2.99.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'ARUBAWIRED-POWERSUPPLY-MIB'} = {
};

View file

@ -0,0 +1,31 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::ARUBAWIREDTEMPSENSORMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'ARUBAWIRED-TEMPSENSOR-MIB'} = {
url => '',
name => 'ARUBAWIRED-TEMPSENSOR-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'ARUBAWIRED-TEMPSENSOR-MIB'} =
'1.3.6.1.4.1.47196.4.1.1.3.11.3';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'ARUBAWIRED-TEMPSENSOR-MIB'} = {
'arubaWiredTempSensor' => '1.3.6.1.4.1.47196.4.1.1.3.11.3',
'arubaWiredTempSensorNotifications' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.0',
'arubaWiredTempSensorTable' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.1',
'arubaWiredTempSensorEntry' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1',
'arubaWiredTempSensorGroupIndex' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.1',
'arubaWiredTempSensorSlotTypeIndex' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.2',
'arubaWiredTempSensorSlotIndex' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.3',
'arubaWiredTempSensorIndex' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.4',
'arubaWiredTempSensorName' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.5',
'arubaWiredTempSensorState' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.6',
'arubaWiredTempSensorTemperature' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.7',
'arubaWiredTempSensorMinTemp' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.8',
'arubaWiredTempSensorMaxTemp' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.1.1.9',
'arubaWiredTempSensorConformance' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.99',
'arubaWiredTempSensorCompliances' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.99.1',
'arubaWiredTempSensorGroups' => '1.3.6.1.4.1.47196.4.1.1.3.11.3.99.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'ARUBAWIRED-TEMPSENSOR-MIB'} = {
};

View file

@ -0,0 +1,56 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::ARUBAWIREDVSFMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'ARUBAWIRED-VSF-MIB'} = {
url => '',
name => 'ARUBAWIRED-VSF-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'ARUBAWIRED-VSF-MIB'} =
'1.3.6.1.4.1.47196.4.1.1.3.10';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'ARUBAWIRED-VSF-MIB'} = {
'arubaWiredVsfMIB' => '1.3.6.1.4.1.47196.4.1.1.3.10',
'arubaWiredVsfObjects' => '1.3.6.1.4.1.47196.4.1.1.3.10.0',
'arubaWiredVsfConfig' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.1',
'arubaWiredVsfTrapEnable' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.1.1',
'arubaWiredVsfOobmMADEnable' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.1.2',
'arubaWiredVsfOobmMADEnableDefinition' => 'ARUBAWIRED-VSF-MIB::arubaWiredVsfOobmMADEnable',
'arubaWiredVsfStatus' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.2',
'arubaWiredVsfOperStatus' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.2.1',
'arubaWiredVsfTopology' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.2.2',
'arubaWiredVsfMemberTable' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3',
'arubaWiredVsfMemberEntry' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1',
'arubaWiredVsfMemberIndex' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.1',
'arubaWiredVsfMemberRole' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.2',
'arubaWiredVsfMemberStatus' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.3',
'arubaWiredVsfMemberPartNumber' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.4',
'arubaWiredVsfMemberMacAddr' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.5',
'arubaWiredVsfMemberProductName' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.6',
'arubaWiredVsfMemberSerialNum' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.7',
'arubaWiredVsfMemberBootImage' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.8',
'arubaWiredVsfMemberCpuUtil' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.9',
'arubaWiredVsfMemberMemoryUtil' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.10',
'arubaWiredVsfMemberBootTime' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.11',
'arubaWiredVsfMemberBootRomVersion' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.12',
'arubaWiredVsfMemberTotalMemory' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.13',
'arubaWiredVsfMemberCurrentUsage' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.3.1.14',
'arubaWiredVsfLinkTable' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.4',
'arubaWiredVsfLinkEntry' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.4.1',
'arubaWiredVsfLinkMemberId' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.4.1.1',
'arubaWiredVsfLinkId' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.4.1.2',
'arubaWiredVsfLinkOperStatus' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.4.1.3',
'arubaWiredVsfLinkPeerMemberId' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.4.1.4',
'arubaWiredVsfLinkPeerLinkId' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.4.1.5',
'arubaWiredVsfLinkPortList' => '1.3.6.1.4.1.47196.4.1.1.3.10.0.4.1.6',
'arubaWiredVsfNotifications' => '1.3.6.1.4.1.47196.4.1.1.3.10.1',
'arubaWiredVsfConformance' => '1.3.6.1.4.1.47196.4.1.1.3.10.2',
'arubaWiredVsfCompliances' => '1.3.6.1.4.1.47196.4.1.1.3.10.2.1',
'arubaWiredVsfGroups' => '1.3.6.1.4.1.47196.4.1.1.3.10.2.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'ARUBAWIRED-VSF-MIB'} = {
'arubaWiredVsfOobmMADEnable' => {
'1' => 'none',
'2' => 'mgmt',
},
};

View file

@ -0,0 +1,82 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::BAMSNMPMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'BAM-SNMP-MIB'} = {
url => '',
name => 'BAM-SNMP-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'BAM-SNMP-MIB'} =
'1.3.6.1.4.1.13315.100.210';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'BAM-SNMP-MIB'} = {
'bam' => '1.3.6.1.4.1.13315.100.210',
'app' => '1.3.6.1.4.1.13315.100.210.1',
'common' => '1.3.6.1.4.1.13315.100.210.1.1',
'version' => '1.3.6.1.4.1.13315.100.210.1.1.1',
'startTime' => '1.3.6.1.4.1.13315.100.210.1.1.2',
'startTimeDefinition' => 'MIB-2-MIB::DateAndTime',
'notificationMessage' => '1.3.6.1.4.1.13315.100.210.1.1.3',
'database' => '1.3.6.1.4.1.13315.100.210.1.2',
'maxPoolSize' => '1.3.6.1.4.1.13315.100.210.1.2.1',
'numConnections' => '1.3.6.1.4.1.13315.100.210.1.2.2',
'deployer' => '1.3.6.1.4.1.13315.100.210.1.3',
'serverCountInQueue' => '1.3.6.1.4.1.13315.100.210.1.3.1',
'executingServerCount' => '1.3.6.1.4.1.13315.100.210.1.3.2',
'numberOfTasks' => '1.3.6.1.4.1.13315.100.210.1.3.3',
'eventNotification' => '1.3.6.1.4.1.13315.100.210.1.4',
'queueCount' => '1.3.6.1.4.1.13315.100.210.1.4.1',
'reconciliation' => '1.3.6.1.4.1.13315.100.210.1.5',
'poolSize' => '1.3.6.1.4.1.13315.100.210.1.5.1',
'scheduledDeployer' => '1.3.6.1.4.1.13315.100.210.1.6',
'numOfTimers' => '1.3.6.1.4.1.13315.100.210.1.6.1',
'running' => '1.3.6.1.4.1.13315.100.210.1.6.2',
'scheduledTaskService' => '1.3.6.1.4.1.13315.100.210.1.7',
'queueSize' => '1.3.6.1.4.1.13315.100.210.1.7.1',
'replication' => '1.3.6.1.4.1.13315.100.210.1.8',
'walFilesTotalSize' => '1.3.6.1.4.1.13315.100.210.1.8.1',
'replicationNodeStatus' => '1.3.6.1.4.1.13315.100.210.1.8.2',
'replicationNodeStatusDefinition' => 'BAM-SNMP-MIB::replicationNodeStatus',
'replicationAverageLatency' => '1.3.6.1.4.1.13315.100.210.1.8.3',
'replicationWarningThreshold' => '1.3.6.1.4.1.13315.100.210.1.8.4',
'replicationBreakThreshold' => '1.3.6.1.4.1.13315.100.210.1.8.5',
'replicationLatencyWarningThreshold' => '1.3.6.1.4.1.13315.100.210.1.8.6',
'replicationLatencyCriticalThreshold' => '1.3.6.1.4.1.13315.100.210.1.8.7',
'replicationStatusTable' => '1.3.6.1.4.1.13315.100.210.1.8.8',
'replicationStatusEntry' => '1.3.6.1.4.1.13315.100.210.1.8.8.1',
'hostname' => '1.3.6.1.4.1.13315.100.210.1.8.8.1.1',
'ipv4Address' => '1.3.6.1.4.1.13315.100.210.1.8.8.1.2',
'currentLatency' => '1.3.6.1.4.1.13315.100.210.1.8.8.1.3',
'replicationHealth' => '1.3.6.1.4.1.13315.100.210.1.8.8.1.4',
'replicationHealthDefinition' => 'BAM-SNMP-MIB::replicationHealth',
'replicationRole' => '1.3.6.1.4.1.13315.100.210.1.8.8.1.5',
'notification' => '1.3.6.1.4.1.13315.100.210.1.9',
'messagesReceived' => '1.3.6.1.4.1.13315.100.210.1.9.1',
'messagesAccepted' => '1.3.6.1.4.1.13315.100.210.1.9.2',
'ackSent' => '1.3.6.1.4.1.13315.100.210.1.9.3',
'messagesProcessed' => '1.3.6.1.4.1.13315.100.210.1.9.4',
'dbBackup' => '1.3.6.1.4.1.13315.100.210.1.10',
'lastSuccessfulBackupTime' => '1.3.6.1.4.1.13315.100.210.1.10.1',
'lastSuccessfulBackupTimeDefinition' => 'MIB-2-MIB::DateAndTime',
'lastSuccessfulRemoteBackupTime' => '1.3.6.1.4.1.13315.100.210.1.10.2',
'lastSuccessfulRemoteBackupTimeDefinition' => 'MIB-2-MIB::DateAndTime',
'jvm' => '1.3.6.1.4.1.13315.100.210.3',
'freeMemory' => '1.3.6.1.4.1.13315.100.210.3.1',
'maxMemory' => '1.3.6.1.4.1.13315.100.210.3.2',
'gcTime' => '1.3.6.1.4.1.13315.100.210.3.3',
'usageThresholdExceeded' => '1.3.6.1.4.1.13315.100.210.3.4',
'activeThreadCount' => '1.3.6.1.4.1.13315.100.210.3.5',
'traps' => '1.3.6.1.4.1.13315.100.210.255',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'BAM-SNMP-MIB'} = {
'replicationNodeStatus' => {
'0' => 'standalone',
'1' => 'primary',
'2' => 'standby',
},
'replicationHealth' => {
'0' => 'Not Replicating',
'1' => 'Initializing',
'2' => 'Replicating',
}
};

View file

@ -0,0 +1,80 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::BCNDHCPV4MIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'BCN-DHCPV4-MIB'} = {
url => '',
name => 'BCN-DHCPV4-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'BCN-DHCPV4-MIB'} =
'bcnDhcpv4MIB';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'BCN-DHCPV4-MIB'} = {
'bcnDhcpv4' => '1.3.6.1.4.1.13315.3.1.1',
'bcnDhcpv4MIB' => '1.3.6.1.4.1.13315.3.1.1.1',
'bcnDhcpv4Objects' => '1.3.6.1.4.1.13315.3.1.1.2',
'bcnDhcpv4ServiceStatus' => '1.3.6.1.4.1.13315.3.1.1.2.1',
'bcnDhcpv4SerOperState' => '1.3.6.1.4.1.13315.3.1.1.2.1.1',
'bcnDhcpv4SerOperStateDefinition' => 'BCN-DHCPV4-MIB::bcnDhcpv4SerOperState',
'bcnDhcpv4FirstAlertIpAddr' => '1.3.6.1.4.1.13315.3.1.1.2.1.2',
'bcnDhcpv4LeaseStatsSuccess' => '1.3.6.1.4.1.13315.3.1.1.2.1.3',
'bcnDhcpv4ServiceStatistics' => '1.3.6.1.4.1.13315.3.1.1.2.2',
'bcnDhcpv4LeaseTable' => '1.3.6.1.4.1.13315.3.1.1.2.2.1',
'bcnDhcpv4LeaseEntry' => '1.3.6.1.4.1.13315.3.1.1.2.2.1.1',
'bcnDhcpv4LeaseIP' => '1.3.6.1.4.1.13315.3.1.1.2.2.1.1.1',
'bcnDhcpv4LeaseStartTime' => '1.3.6.1.4.1.13315.3.1.1.2.2.1.1.2',
'bcnDhcpv4LeaseEndTime' => '1.3.6.1.4.1.13315.3.1.1.2.2.1.1.3',
'bcnDhcpv4LeaseTimeStamp' => '1.3.6.1.4.1.13315.3.1.1.2.2.1.1.4',
'bcnDhcpv4LeaseMacAddress' => '1.3.6.1.4.1.13315.3.1.1.2.2.1.1.5',
'bcnDhcpv4LeaseHostname' => '1.3.6.1.4.1.13315.3.1.1.2.2.1.1.6',
'bcnDhcpv4SubnetTable' => '1.3.6.1.4.1.13315.3.1.1.2.2.2',
'bcnDhcpv4SubnetEntry' => '1.3.6.1.4.1.13315.3.1.1.2.2.2.1',
'bcnDhcpv4SubnetIP' => '1.3.6.1.4.1.13315.3.1.1.2.2.2.1.1',
'bcnDhcpv4SubnetMask' => '1.3.6.1.4.1.13315.3.1.1.2.2.2.1.2',
'bcnDhcpv4SubnetSize' => '1.3.6.1.4.1.13315.3.1.1.2.2.2.1.3',
'bcnDhcpv4SubnetFreeAddresses' => '1.3.6.1.4.1.13315.3.1.1.2.2.2.1.4',
'bcnDhcpv4SubnetLowThreshold' => '1.3.6.1.4.1.13315.3.1.1.2.2.2.1.5',
'bcnDhcpv4SubnetHighThreshold' => '1.3.6.1.4.1.13315.3.1.1.2.2.2.1.6',
'bcnDhcpv4PoolTable' => '1.3.6.1.4.1.13315.3.1.1.2.2.3',
'bcnDhcpv4PoolEntry' => '1.3.6.1.4.1.13315.3.1.1.2.2.3.1',
'bcnDhcpv4PoolStartIP' => '1.3.6.1.4.1.13315.3.1.1.2.2.3.1.1',
'bcnDhcpv4PoolEndIP' => '1.3.6.1.4.1.13315.3.1.1.2.2.3.1.2',
'bcnDhcpv4PoolSubnetIP' => '1.3.6.1.4.1.13315.3.1.1.2.2.3.1.3',
'bcnDhcpv4PoolSize' => '1.3.6.1.4.1.13315.3.1.1.2.2.3.1.4',
'bcnDhcpv4PoolFreeAddresses' => '1.3.6.1.4.1.13315.3.1.1.2.2.3.1.5',
'bcnDhcpv4FixedIPTable' => '1.3.6.1.4.1.13315.3.1.1.2.2.4',
'bcnDhcpv4FixedIPEntry' => '1.3.6.1.4.1.13315.3.1.1.2.2.4.1',
'bcnDhcpv4FixedIP' => '1.3.6.1.4.1.13315.3.1.1.2.2.4.1.1',
'bcnDhcpv4Notification' => '1.3.6.1.4.1.13315.3.1.1.3',
'bcnDhcpv4NotificationEvents' => '1.3.6.1.4.1.13315.3.1.1.3.0',
'bcnDhcpv4NotificationData' => '1.3.6.1.4.1.13315.3.1.1.3.1',
'bcnDhcpv4AlarmSeverity' => '1.3.6.1.4.1.13315.3.1.1.3.1.1',
'bcnDhcpv4AlarmInfo' => '1.3.6.1.4.1.13315.3.1.1.3.1.2',
'bcnDhcpv4FailOverState' => '1.3.6.1.4.1.13315.3.1.1.3.1.3',
'bcnDhcpv4FailOverStateDefinition' => 'BCN-DHCPV4-MIB::bcnDhcpv4FailOverState',
'bcnDhcpv4SubnetAlertIpAddr' => '1.3.6.1.4.1.13315.3.1.1.3.1.4',
'bcnDhcpv4Conformance' => '1.3.6.1.4.1.13315.3.1.1.4',
'bcnDhcpv4ServiceCompliances' => '1.3.6.1.4.1.13315.3.1.1.4.1',
'bcnDhcpv4ServiceGroups' => '1.3.6.1.4.1.13315.3.1.1.4.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'BCN-DHCPV4-MIB'} = {
'bcnDhcpv4FailOverState' => {
'1' => 'startup',
'2' => 'normal',
'3' => 'communicationsInterrupted',
'4' => 'partnerDown',
'5' => 'potentialConflict',
'6' => 'recover',
'7' => 'paused',
'8' => 'shutdown',
'9' => 'recoverDone',
'254' => 'recoverWait',
},
'bcnDhcpv4SerOperState' => {
'1' => 'running',
'2' => 'notRunning',
'3' => 'starting',
'4' => 'stopping',
'5' => 'fault',
},
};

View file

@ -0,0 +1,55 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::BCNDNSMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'BCN-DNS-MIB'} = {
url => '',
name => 'BCN-DNS-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'BCN-DNS-MIB'} =
'1.3.6.1.4.1.13315.3.1.2.1';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'BCN-DNS-MIB'} = {
'bcnDns' => '1.3.6.1.4.1.13315.3.1.2',
'bcnDnsMIB' => '1.3.6.1.4.1.13315.3.1.2.1',
'bcnDnsObjects' => '1.3.6.1.4.1.13315.3.1.2.2',
'bcnDnsServiceStatus' => '1.3.6.1.4.1.13315.3.1.2.2.1',
'bcnDnsSerOperState' => '1.3.6.1.4.1.13315.3.1.2.2.1.1',
'bcnDnsSerOperStateDefinition' => 'BCN-DNS-MIB::bcnDnsSerOperState',
'bcnDnsSerNumberOfZones' => '1.3.6.1.4.1.13315.3.1.2.2.1.2',
'bcnDnsSerTransfersRunning' => '1.3.6.1.4.1.13315.3.1.2.2.1.3',
'bcnDnsSerTransfersDeferred' => '1.3.6.1.4.1.13315.3.1.2.2.1.4',
'bcnDnsSerSOAQueriesInProgress' => '1.3.6.1.4.1.13315.3.1.2.2.1.5',
'bcnDnsSerQueryLogging' => '1.3.6.1.4.1.13315.3.1.2.2.1.6',
'bcnDnsSerQueryLoggingDefinition' => 'BCN-DNS-MIB::bcnDnsSerQueryLogging',
'bcnDnsSerDebugLevel' => '1.3.6.1.4.1.13315.3.1.2.2.1.7',
'bcnDnsServiceStatistics' => '1.3.6.1.4.1.13315.3.1.2.2.2',
'bcnDnsStatServer' => '1.3.6.1.4.1.13315.3.1.2.2.2.1',
'bcnDnsStatSrvQrySuccess' => '1.3.6.1.4.1.13315.3.1.2.2.2.1.1',
'bcnDnsStatSrvQryReferral' => '1.3.6.1.4.1.13315.3.1.2.2.2.1.2',
'bcnDnsStatSrvQryNXRRSet' => '1.3.6.1.4.1.13315.3.1.2.2.2.1.3',
'bcnDnsStatSrvQryNXDomain' => '1.3.6.1.4.1.13315.3.1.2.2.2.1.4',
'bcnDnsStatSrvQryRecursion' => '1.3.6.1.4.1.13315.3.1.2.2.2.1.5',
'bcnDnsStatSrvQryFailure' => '1.3.6.1.4.1.13315.3.1.2.2.2.1.6',
'bcnDnsNotification' => '1.3.6.1.4.1.13315.3.1.2.3',
'bcnDnsNotificationEvents' => '1.3.6.1.4.1.13315.3.1.2.3.0',
'bcnDnsNotificationData' => '1.3.6.1.4.1.13315.3.1.2.3.1',
'bcnDnsAlarmSeverity' => '1.3.6.1.4.1.13315.3.1.2.3.1.1',
'bcnDnsAlarmInfo' => '1.3.6.1.4.1.13315.3.1.2.3.1.2',
'bcnDnsConformance' => '1.3.6.1.4.1.13315.3.1.2.4',
'bcnDnsServiceCompliances' => '1.3.6.1.4.1.13315.3.1.2.4.1',
'bcnDnsServiceGroups' => '1.3.6.1.4.1.13315.3.1.2.4.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'BCN-DNS-MIB'} = {
'bcnDnsSerOperState' => {
'1' => 'running',
'2' => 'notRunning',
'3' => 'starting',
'4' => 'stopping',
'5' => 'fault',
},
'bcnDnsSerQueryLogging' => {
'1' => 'on',
'2' => 'off',
},
};

View file

@ -0,0 +1,57 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::BCNSYSTEMMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'BCN-SYSTEM-MIB'} = {
url => '',
name => 'BCN-SYSTEM-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'BCN-SYSTEM-MIB'} =
'1.3.6.1.4.1.13315.3.2.1';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'BCN-SYSTEM-MIB'} = {
'bcnSystem' => '1.3.6.1.4.1.13315.3.2',
'bcnSystemMIB' => '1.3.6.1.4.1.13315.3.2.1',
'bcnSystemObjects' => '1.3.6.1.4.1.13315.3.2.2',
'bcnSysIdentification' => '1.3.6.1.4.1.13315.3.2.2.1',
'bcnSysIdProduct' => '1.3.6.1.4.1.13315.3.2.2.1.1',
'bcnSysIdOSRelease' => '1.3.6.1.4.1.13315.3.2.2.1.2',
'bcnSysIdSerial' => '1.3.6.1.4.1.13315.3.2.2.1.3',
'bcnSysIdServiceTag' => '1.3.6.1.4.1.13315.3.2.2.1.4',
'bcnSysIdPlatform' => '1.3.6.1.4.1.13315.3.2.2.1.5',
'bcnSysIdVendorPlatform' => '1.3.6.1.4.1.13315.3.2.2.1.6',
'bcnSysIdServicesTable' => '1.3.6.1.4.1.13315.3.2.2.1.7',
'bcnSysIdServicesEntry' => '1.3.6.1.4.1.13315.3.2.2.1.7.1',
'bcnSysIdServicesIndex' => '1.3.6.1.4.1.13315.3.2.2.1.7.1.1',
'bcnSysIdServicesOID' => '1.3.6.1.4.1.13315.3.2.2.1.7.1.2',
'bcnSysIdServicesStateTS' => '1.3.6.1.4.1.13315.3.2.2.1.7.1.3',
'bcnSysServices' => '1.3.6.1.4.1.13315.3.2.2.2',
'bcnSysServDNSService' => '1.3.6.1.4.1.13315.3.2.2.2.1',
'bcnSysServDHCPService' => '1.3.6.1.4.1.13315.3.2.2.2.2',
'bcnSysServTFTPService' => '1.3.6.1.4.1.13315.3.2.2.2.3',
'bcnSysServLicensing' => '1.3.6.1.4.1.13315.3.2.2.2.4',
'bcnSysServTFTP' => '1.3.6.1.4.1.13315.3.2.2.2.5',
'bcnSysServNTP' => '1.3.6.1.4.1.13315.3.2.2.2.6',
'bcnSysServPowerSupply' => '1.3.6.1.4.1.13315.3.2.2.2.7',
'bcnSysServNetworkInterface' => '1.3.6.1.4.1.13315.3.2.2.2.8',
'bcnSysServHighAvailability' => '1.3.6.1.4.1.13315.3.2.2.2.9',
'bcnSysServReplication' => '1.3.6.1.4.1.13315.3.2.2.2.10',
'bcnSysServSystem' => '1.3.6.1.4.1.13315.3.2.2.2.11',
'bcnSystemNotification' => '1.3.6.1.4.1.13315.3.2.3',
'bcnSysNotificationEvents' => '1.3.6.1.4.1.13315.3.2.3.0',
'bcnSysNotificationData' => '1.3.6.1.4.1.13315.3.2.3.1',
'bcnSysSerOperState' => '1.3.6.1.4.1.13315.3.2.3.1.1',
'bcnSysSerOperStateDefinition' => 'BCN-SYSTEM-MIB::bcnSysSerOperState',
'bcnSysAlarmSeverity' => '1.3.6.1.4.1.13315.3.2.3.1.2',
'bcnSysAlarmInfo' => '1.3.6.1.4.1.13315.3.2.3.1.3',
'bcnSystemConformance' => '1.3.6.1.4.1.13315.3.2.4',
'bcnSysServliances' => '1.3.6.1.4.1.13315.3.2.4.1',
'bcnSysGroups' => '1.3.6.1.4.1.13315.3.2.4.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'BCN-SYSTEM-MIB'} = {
'bcnSysSerOperState' => {
'1' => 'start',
'2' => 'reboot',
'3' => 'shutdown',
},
};

View file

@ -0,0 +1,153 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::CISCOEIGRPMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'CISCO-EIGRP-MIB'} = {
url => '',
name => 'CISCO-EIGRP-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'CISCO-EIGRP-MIB'} =
'1.3.6.1.4.1.9.9.449';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-EIGRP-MIB'} = {
ciscoEigrpMIB => '1.3.6.1.4.1.9.9.449',
cEigrpMIBNotifications => '1.3.6.1.4.1.9.9.449.0',
cEigrpMIBObjects => '1.3.6.1.4.1.9.9.449.1',
cEigrpVpnInfo => '1.3.6.1.4.1.9.9.449.1.1',
cEigrpVpnTable => '1.3.6.1.4.1.9.9.449.1.1.1',
cEigrpVpnEntry => '1.3.6.1.4.1.9.9.449.1.1.1.1',
cEigrpVpnId => '1.3.6.1.4.1.9.9.449.1.1.1.1.1',
cEigrpVpnName => '1.3.6.1.4.1.9.9.449.1.1.1.1.2',
cEigrpAsInfo => '1.3.6.1.4.1.9.9.449.1.2',
cEigrpTraffStatsTable => '1.3.6.1.4.1.9.9.449.1.2.1',
cEigrpTraffStatsEntry => '1.3.6.1.4.1.9.9.449.1.2.1.1',
cEigrpAsNumber => '1.3.6.1.4.1.9.9.449.1.2.1.1.1',
cEigrpNbrCount => '1.3.6.1.4.1.9.9.449.1.2.1.1.2',
cEigrpHellosSent => '1.3.6.1.4.1.9.9.449.1.2.1.1.3',
cEigrpHellosRcvd => '1.3.6.1.4.1.9.9.449.1.2.1.1.4',
cEigrpUpdatesSent => '1.3.6.1.4.1.9.9.449.1.2.1.1.5',
cEigrpUpdatesRcvd => '1.3.6.1.4.1.9.9.449.1.2.1.1.6',
cEigrpQueriesSent => '1.3.6.1.4.1.9.9.449.1.2.1.1.7',
cEigrpQueriesRcvd => '1.3.6.1.4.1.9.9.449.1.2.1.1.8',
cEigrpRepliesSent => '1.3.6.1.4.1.9.9.449.1.2.1.1.9',
cEigrpRepliesRcvd => '1.3.6.1.4.1.9.9.449.1.2.1.1.10',
cEigrpAcksSent => '1.3.6.1.4.1.9.9.449.1.2.1.1.11',
cEigrpAcksRcvd => '1.3.6.1.4.1.9.9.449.1.2.1.1.12',
cEigrpInputQHighMark => '1.3.6.1.4.1.9.9.449.1.2.1.1.13',
cEigrpInputQDrops => '1.3.6.1.4.1.9.9.449.1.2.1.1.14',
cEigrpSiaQueriesSent => '1.3.6.1.4.1.9.9.449.1.2.1.1.15',
cEigrpSiaQueriesRcvd => '1.3.6.1.4.1.9.9.449.1.2.1.1.16',
cEigrpAsRouterIdType => '1.3.6.1.4.1.9.9.449.1.2.1.1.17',
cEigrpAsRouterIdTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cEigrpAsRouterId => '1.3.6.1.4.1.9.9.449.1.2.1.1.18',
cEigrpAsRouterIdDefinition => 'INET-ADDRESS-MIB::InetAddress(cEigrpAsRouterIdType)',
cEigrpTopoRoutes => '1.3.6.1.4.1.9.9.449.1.2.1.1.19',
cEigrpHeadSerial => '1.3.6.1.4.1.9.9.449.1.2.1.1.20',
cEigrpNextSerial => '1.3.6.1.4.1.9.9.449.1.2.1.1.21',
cEigrpXmitPendReplies => '1.3.6.1.4.1.9.9.449.1.2.1.1.22',
cEigrpXmitDummies => '1.3.6.1.4.1.9.9.449.1.2.1.1.23',
cEigrpTopologyInfo => '1.3.6.1.4.1.9.9.449.1.3',
cEigrpTopoTable => '1.3.6.1.4.1.9.9.449.1.3.1',
cEigrpTopoEntry => '1.3.6.1.4.1.9.9.449.1.3.1.1',
cEigrpDestNetType => '1.3.6.1.4.1.9.9.449.1.3.1.1.1',
cEigrpDestNetTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cEigrpDestNet => '1.3.6.1.4.1.9.9.449.1.3.1.1.2',
cEigrpDestNetDefinition => 'INET-ADDRESS-MIB::InetAddress(cEigrpDestNetType)',
cEigrpDestNetPrefixLen => '1.3.6.1.4.1.9.9.449.1.3.1.1.4',
cEigrpActive => '1.3.6.1.4.1.9.9.449.1.3.1.1.5',
cEigrpStuckInActive => '1.3.6.1.4.1.9.9.449.1.3.1.1.6',
cEigrpDestSuccessors => '1.3.6.1.4.1.9.9.449.1.3.1.1.7',
cEigrpFdistance => '1.3.6.1.4.1.9.9.449.1.3.1.1.8',
cEigrpRouteOriginType => '1.3.6.1.4.1.9.9.449.1.3.1.1.9',
cEigrpRouteOriginAddrType => '1.3.6.1.4.1.9.9.449.1.3.1.1.10',
cEigrpRouteOriginAddrTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cEigrpRouteOriginAddr => '1.3.6.1.4.1.9.9.449.1.3.1.1.11',
cEigrpRouteOriginAddrDefinition => 'INET-ADDRESS-MIB::InetAddress(cEigrpRouteOriginAddrType)',
cEigrpNextHopAddressType => '1.3.6.1.4.1.9.9.449.1.3.1.1.12',
cEigrpNextHopAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cEigrpNextHopAddress => '1.3.6.1.4.1.9.9.449.1.3.1.1.13',
cEigrpNextHopAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cEigrpNextHopAddressType)',
cEigrpNextHopInterface => '1.3.6.1.4.1.9.9.449.1.3.1.1.14',
cEigrpDistance => '1.3.6.1.4.1.9.9.449.1.3.1.1.15',
cEigrpReportDistance => '1.3.6.1.4.1.9.9.449.1.3.1.1.16',
cEigrpFdistanceWide => '1.3.6.1.4.1.9.9.449.1.3.1.1.17',
cEigrpDistanceWide => '1.3.6.1.4.1.9.9.449.1.3.1.1.18',
cEigrpReportDistanceWide => '1.3.6.1.4.1.9.9.449.1.3.1.1.19',
cEigrpPeerInfo => '1.3.6.1.4.1.9.9.449.1.4',
cEigrpPeerTable => '1.3.6.1.4.1.9.9.449.1.4.1',
cEigrpPeerEntry => '1.3.6.1.4.1.9.9.449.1.4.1.1',
cEigrpHandle => '1.3.6.1.4.1.9.9.449.1.4.1.1.1',
cEigrpPeerAddrType => '1.3.6.1.4.1.9.9.449.1.4.1.1.2',
cEigrpPeerAddrTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cEigrpPeerAddr => '1.3.6.1.4.1.9.9.449.1.4.1.1.3',
cEigrpPeerAddrDefinition => 'INET-ADDRESS-MIB::InetAddress(cEigrpPeerAddrType)',
cEigrpPeerIfIndex => '1.3.6.1.4.1.9.9.449.1.4.1.1.4',
cEigrpHoldTime => '1.3.6.1.4.1.9.9.449.1.4.1.1.5',
cEigrpUpTime => '1.3.6.1.4.1.9.9.449.1.4.1.1.6',
cEigrpUpTimeDefinition => 'CISCO-EIGRP-MIB::cEigrpUpTime',
cEigrpSrtt => '1.3.6.1.4.1.9.9.449.1.4.1.1.7',
cEigrpRto => '1.3.6.1.4.1.9.9.449.1.4.1.1.8',
cEigrpPktsEnqueued => '1.3.6.1.4.1.9.9.449.1.4.1.1.9',
cEigrpLastSeq => '1.3.6.1.4.1.9.9.449.1.4.1.1.10',
cEigrpVersion => '1.3.6.1.4.1.9.9.449.1.4.1.1.11',
cEigrpRetrans => '1.3.6.1.4.1.9.9.449.1.4.1.1.12',
cEigrpRetries => '1.3.6.1.4.1.9.9.449.1.4.1.1.13',
cEigrpInterfaceInfo => '1.3.6.1.4.1.9.9.449.1.5',
cEigrpInterfaceTable => '1.3.6.1.4.1.9.9.449.1.5.1',
cEigrpInterfaceEntry => '1.3.6.1.4.1.9.9.449.1.5.1.1',
cEigrpPeerCount => '1.3.6.1.4.1.9.9.449.1.5.1.1.3',
cEigrpXmitReliableQ => '1.3.6.1.4.1.9.9.449.1.5.1.1.4',
cEigrpXmitUnreliableQ => '1.3.6.1.4.1.9.9.449.1.5.1.1.5',
cEigrpMeanSrtt => '1.3.6.1.4.1.9.9.449.1.5.1.1.6',
cEigrpPacingReliable => '1.3.6.1.4.1.9.9.449.1.5.1.1.7',
cEigrpPacingUnreliable => '1.3.6.1.4.1.9.9.449.1.5.1.1.8',
cEigrpMFlowTimer => '1.3.6.1.4.1.9.9.449.1.5.1.1.9',
cEigrpPendingRoutes => '1.3.6.1.4.1.9.9.449.1.5.1.1.10',
cEigrpHelloInterval => '1.3.6.1.4.1.9.9.449.1.5.1.1.11',
cEigrpXmitNextSerial => '1.3.6.1.4.1.9.9.449.1.5.1.1.12',
cEigrpUMcasts => '1.3.6.1.4.1.9.9.449.1.5.1.1.13',
cEigrpRMcasts => '1.3.6.1.4.1.9.9.449.1.5.1.1.14',
cEigrpUUcasts => '1.3.6.1.4.1.9.9.449.1.5.1.1.15',
cEigrpRUcasts => '1.3.6.1.4.1.9.9.449.1.5.1.1.16',
cEigrpMcastExcepts => '1.3.6.1.4.1.9.9.449.1.5.1.1.17',
cEigrpCRpkts => '1.3.6.1.4.1.9.9.449.1.5.1.1.18',
cEigrpAcksSuppressed => '1.3.6.1.4.1.9.9.449.1.5.1.1.19',
cEigrpRetransSent => '1.3.6.1.4.1.9.9.449.1.5.1.1.20',
cEigrpOOSrvcd => '1.3.6.1.4.1.9.9.449.1.5.1.1.21',
cEigrpAuthMode => '1.3.6.1.4.1.9.9.449.1.5.1.1.22',
cEigrpAuthModeDefinition => 'CISCO-EIGRP-MIB::cEigrpAuthMode',
cEigrpAuthKeyChain => '1.3.6.1.4.1.9.9.449.1.5.1.1.23',
cEigrpMIBConformance => '1.3.6.1.4.1.9.9.449.2',
cEigrpMIBCompliances => '1.3.6.1.4.1.9.9.449.2.1',
cEigrpMIBGroups => '1.3.6.1.4.1.9.9.449.2.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-EIGRP-MIB'} = {
cEigrpAuthMode => {
'1' => 'none',
'2' => 'md5',
},
cEigrpUpTime => sub {
my ($uptime) = @_;
# If the up time is less than 24 hours, the number
# of days will not be reflected and the string will
# be formatted like this: 'hh:mm:ss', reflecting
# hours, minutes, and seconds.
#
# If the up time is greater than 24 hours, EIGRP is
# less precise and the minutes and seconds are not
# reflected. Instead only the days and hours are shown
# and the string will be formatted like this: 'xxxdxxh'."
#
# Aha, und wie erklaerst du dir das hier????
# 17w3d 6w5d 1y4w
if ($uptime =~ /(\d+)y(\d+)w/) {
return $1 * 365*24*3600 + $2 * 7*24*3600;
} elsif ($uptime =~ /(\d+)w(\d+)d/) {
return $1 * 7*24*3600 + $2 * 24*3600;
} elsif ($uptime =~ /(\d+)d(\d+)h/) {
return $1 * 24*3600 + $2 * 3600;
} elsif ($uptime =~ /(\d+):(\d+):(\d+)/) {
return $1 * 3600 + $2 * 60 + $3;
}
},
};

View file

@ -21,6 +21,7 @@ $Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-ENTITY-SENSOR-M
'entSensorScaleDefinition' => 'CISCO-ENTITY-SENSOR-MIB::SensorDataScale',
'entSensorPrecision' => '1.3.6.1.4.1.9.9.91.1.1.1.1.3',
'entSensorValue' => '1.3.6.1.4.1.9.9.91.1.1.1.1.4',
'entSensorValueDefinition' => 'CISCO-ENTITY-SENSOR-MIB::entSensorValue(entSensorScale,entSensorType)',
'entSensorStatus' => '1.3.6.1.4.1.9.9.91.1.1.1.1.5',
'entSensorStatusDefinition' => 'CISCO-ENTITY-SENSOR-MIB::SensorStatus',
'entSensorValueTimeStamp' => '1.3.6.1.4.1.9.9.91.1.1.1.1.6',
@ -95,6 +96,35 @@ $Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-ENTITY-SENSOR-MIB
'16' => 'zetta',
'17' => 'yotta',
},
'entSensorValue' => sub {
my($value, $scale, $type) = @_;
if ($type eq "truthvalue") {
return $value ? "true" : "false";
} elsif ($type eq "specialEnum") {
return $value;
} else {
my $exp = {
yocto => -24,
zepto => -21,
atto => -18,
femto => -15,
pico => -12,
nano => -9,
micro => -6,
milli => -3,
units => 0,
kilo => 3,
mega => 6,
giga => 9,
tera => 12,
exa => 15,
peta => 18,
zetta => 21,
yotta => 24,
};
return exists $exp->{$scale} ? $value * 10 ** $exp->{$scale} : $value;
}
},
};
1;

View file

@ -0,0 +1,207 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::CISCOLICENSEMGMTMIB;
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'CISCO-LICENSE-MGMT-MIB'} = {
url => '',
name => 'CISCO-LICENSE-MGMT-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'CISCO-LICENSE-MGMT-MIB'} =
'1.3.6.1.4.1.9.9.543';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-LICENSE-MGMT-MIB'} = {
'ciscoLicenseMgmtMIB' => '1.3.6.1.4.1.9.9.543',
'ciscoLicenseMgmtMIBNotifs' => '1.3.6.1.4.1.9.9.543.0',
'ciscoLicenseMgmtMIBObjects' => '1.3.6.1.4.1.9.9.543.1',
'clmgmtLicenseConfiguration' => '1.3.6.1.4.1.9.9.543.1.1',
'clmgmtNextFreeLicenseActionIndex' => '1.3.6.1.4.1.9.9.543.1.1.1',
'clmgmtLicenseActionTable' => '1.3.6.1.4.1.9.9.543.1.1.2',
'clmgmtLicenseActionEntry' => '1.3.6.1.4.1.9.9.543.1.1.2.1',
'clmgmtLicenseActionIndex' => '1.3.6.1.4.1.9.9.543.1.1.2.1.1',
'clmgmtLicenseActionEntPhysicalIndex' => '1.3.6.1.4.1.9.9.543.1.1.2.1.2',
'clmgmtLicenseActionTransferProtocol' => '1.3.6.1.4.1.9.9.543.1.1.2.1.3',
'clmgmtLicenseActionTransferProtocolDefinition' => 'CISCO-LICENSE-MGMT-MIB::ClmgmtLicenseTransferProtocol',
'clmgmtLicenseServerAddressType' => '1.3.6.1.4.1.9.9.543.1.1.2.1.4',
'clmgmtLicenseServerAddress' => '1.3.6.1.4.1.9.9.543.1.1.2.1.5',
'clmgmtLicenseServerUsername' => '1.3.6.1.4.1.9.9.543.1.1.2.1.6',
'clmgmtLicenseServerPassword' => '1.3.6.1.4.1.9.9.543.1.1.2.1.7',
'clmgmtLicenseFile' => '1.3.6.1.4.1.9.9.543.1.1.2.1.8',
'clmgmtLicenseStore' => '1.3.6.1.4.1.9.9.543.1.1.2.1.9',
'clmgmtLicenseActionLicenseIndex' => '1.3.6.1.4.1.9.9.543.1.1.2.1.10',
'clmgmtLicensePermissionTicketFile' => '1.3.6.1.4.1.9.9.543.1.1.2.1.11',
'clmgmtLicenseRehostTicketFile' => '1.3.6.1.4.1.9.9.543.1.1.2.1.12',
'clmgmtLicenseBackupFile' => '1.3.6.1.4.1.9.9.543.1.1.2.1.13',
'clmgmtLicenseStopOnFailure' => '1.3.6.1.4.1.9.9.543.1.1.2.1.14',
'clmgmtLicenseAction' => '1.3.6.1.4.1.9.9.543.1.1.2.1.15',
'clmgmtLicenseActionDefinition' => 'CISCO-LICENSE-MGMT-MIB::clmgmtLicenseAction',
'clmgmtLicenseActionState' => '1.3.6.1.4.1.9.9.543.1.1.2.1.16',
'clmgmtLicenseActionStateDefinition' => 'CISCO-LICENSE-MGMT-MIB::ClmgmtLicenseActionState',
'clmgmtLicenseJobQPosition' => '1.3.6.1.4.1.9.9.543.1.1.2.1.17',
'clmgmtLicenseActionFailCause' => '1.3.6.1.4.1.9.9.543.1.1.2.1.18',
'clmgmtLicenseActionFailCauseDefinition' => 'CISCO-LICENSE-MGMT-MIB::ClmgmtLicenseActionFailCause',
'clmgmtLicenseActionStorageType' => '1.3.6.1.4.1.9.9.543.1.1.2.1.19',
'clmgmtLicenseActionRowStatus' => '1.3.6.1.4.1.9.9.543.1.1.2.1.20',
'clmgmtLicenseAcceptEULA' => '1.3.6.1.4.1.9.9.543.1.1.2.1.21',
'clmgmtLicenseEULAFile' => '1.3.6.1.4.1.9.9.543.1.1.2.1.22',
'clmgmtLicenseActionResultTable' => '1.3.6.1.4.1.9.9.543.1.1.3',
'clmgmtLicenseActionResultEntry' => '1.3.6.1.4.1.9.9.543.1.1.3.1',
'clmgmtLicenseNumber' => '1.3.6.1.4.1.9.9.543.1.1.3.1.1',
'clmgmtLicenseIndivActionState' => '1.3.6.1.4.1.9.9.543.1.1.3.1.2',
'clmgmtLicenseIndivActionStateDefinition' => 'CISCO-LICENSE-MGMT-MIB::ClmgmtLicenseActionState',
'clmgmtLicenseIndivActionFailCause' => '1.3.6.1.4.1.9.9.543.1.1.3.1.3',
'clmgmtLicenseIndivActionFailCauseDefinition' => 'CISCO-LICENSE-MGMT-MIB::ClmgmtLicenseActionFailCause',
'clmgmtLicenseInformation' => '1.3.6.1.4.1.9.9.543.1.2',
'clmgmtLicenseStoreInfoTable' => '1.3.6.1.4.1.9.9.543.1.2.1',
'clmgmtLicenseStoreInfoEntry' => '1.3.6.1.4.1.9.9.543.1.2.1.1',
'clmgmtLicenseStoreIndex' => '1.3.6.1.4.1.9.9.543.1.2.1.1.1',
'clmgmtLicenseStoreName' => '1.3.6.1.4.1.9.9.543.1.2.1.1.2',
'clmgmtLicenseStoreTotalSize' => '1.3.6.1.4.1.9.9.543.1.2.1.1.3',
'clmgmtLicenseStoreSizeRemaining' => '1.3.6.1.4.1.9.9.543.1.2.1.1.4',
'clmgmtLicenseDeviceInfoTable' => '1.3.6.1.4.1.9.9.543.1.2.2',
'clmgmtLicenseDeviceInfoEntry' => '1.3.6.1.4.1.9.9.543.1.2.2.1',
'clmgmtDefaultLicenseStore' => '1.3.6.1.4.1.9.9.543.1.2.2.1.1',
'clmgmtLicenseInfoTable' => '1.3.6.1.4.1.9.9.543.1.2.3',
'clmgmtLicenseInfoEntry' => '1.3.6.1.4.1.9.9.543.1.2.3.1',
'clmgmtLicenseStoreUsed' => '1.3.6.1.4.1.9.9.543.1.2.3.1.1',
'clmgmtLicenseIndex' => '1.3.6.1.4.1.9.9.543.1.2.3.1.2',
'clmgmtLicenseFeatureName' => '1.3.6.1.4.1.9.9.543.1.2.3.1.3',
'clmgmtLicenseFeatureVersion' => '1.3.6.1.4.1.9.9.543.1.2.3.1.4',
'clmgmtLicenseType' => '1.3.6.1.4.1.9.9.543.1.2.3.1.5',
'clmgmtLicenseTypeDefinition' => 'CISCO-LICENSE-MGMT-MIB::clmgmtLicenseType',
'clmgmtLicenseCounted' => '1.3.6.1.4.1.9.9.543.1.2.3.1.6',
'clmgmtLicenseValidityPeriod' => '1.3.6.1.4.1.9.9.543.1.2.3.1.7',
'clmgmtLicenseValidityPeriodRemaining' => '1.3.6.1.4.1.9.9.543.1.2.3.1.8',
'clmgmtLicenseExpiredPeriod' => '1.3.6.1.4.1.9.9.543.1.2.3.1.9',
'clmgmtLicenseMaxUsageCount' => '1.3.6.1.4.1.9.9.543.1.2.3.1.10',
'clmgmtLicenseUsageCountRemaining' => '1.3.6.1.4.1.9.9.543.1.2.3.1.11',
'clmgmtLicenseEULAStatus' => '1.3.6.1.4.1.9.9.543.1.2.3.1.12',
'clmgmtLicenseComments' => '1.3.6.1.4.1.9.9.543.1.2.3.1.13',
'clmgmtLicenseStatus' => '1.3.6.1.4.1.9.9.543.1.2.3.1.14',
'clmgmtLicenseStatusDefinition' => 'CISCO-LICENSE-MGMT-MIB::clmgmtLicenseStatus',
'clmgmtLicenseStartDate' => '1.3.6.1.4.1.9.9.543.1.2.3.1.15',
'clmgmtLicenseEndDate' => '1.3.6.1.4.1.9.9.543.1.2.3.1.16',
'clmgmtLicensePeriodUsed' => '1.3.6.1.4.1.9.9.543.1.2.3.1.17',
'clmgmtLicensableFeatureTable' => '1.3.6.1.4.1.9.9.543.1.2.4',
'clmgmtLicensableFeatureEntry' => '1.3.6.1.4.1.9.9.543.1.2.4.1',
'clmgmtFeatureIndex' => '1.3.6.1.4.1.9.9.543.1.2.4.1.1',
'clmgmtFeatureName' => '1.3.6.1.4.1.9.9.543.1.2.4.1.2',
'clmgmtFeatureVersion' => '1.3.6.1.4.1.9.9.543.1.2.4.1.3',
'clmgmtFeatureValidityPeriodRemaining' => '1.3.6.1.4.1.9.9.543.1.2.4.1.4',
'clmgmtFeatureWhatIsCounted' => '1.3.6.1.4.1.9.9.543.1.2.4.1.5',
'clmgmtFeatureStartDate' => '1.3.6.1.4.1.9.9.543.1.2.4.1.6',
'clmgmtFeatureEndDate' => '1.3.6.1.4.1.9.9.543.1.2.4.1.7',
'clmgmtFeaturePeriodUsed' => '1.3.6.1.4.1.9.9.543.1.2.4.1.8',
'clmgmtLicenseDeviceInformation' => '1.3.6.1.4.1.9.9.543.1.3',
'clmgmtNextFreeDevCredExportActionIndex' => '1.3.6.1.4.1.9.9.543.1.3.1',
'clmgmtDevCredExportActionTable' => '1.3.6.1.4.1.9.9.543.1.3.2',
'clmgmtDevCredExportActionEntry' => '1.3.6.1.4.1.9.9.543.1.3.2.1',
'clmgmtDevCredExportActionIndex' => '1.3.6.1.4.1.9.9.543.1.3.2.1.1',
'clmgmtDevCredEntPhysicalIndex' => '1.3.6.1.4.1.9.9.543.1.3.2.1.2',
'clmgmtDevCredTransferProtocol' => '1.3.6.1.4.1.9.9.543.1.3.2.1.3',
'clmgmtDevCredTransferProtocolDefinition' => 'CISCO-LICENSE-MGMT-MIB::ClmgmtLicenseTransferProtocol',
'clmgmtDevCredServerAddressType' => '1.3.6.1.4.1.9.9.543.1.3.2.1.4',
'clmgmtDevCredServerAddress' => '1.3.6.1.4.1.9.9.543.1.3.2.1.5',
'clmgmtDevCredServerUsername' => '1.3.6.1.4.1.9.9.543.1.3.2.1.6',
'clmgmtDevCredServerPassword' => '1.3.6.1.4.1.9.9.543.1.3.2.1.7',
'clmgmtDevCredExportFile' => '1.3.6.1.4.1.9.9.543.1.3.2.1.8',
'clmgmtDevCredCommand' => '1.3.6.1.4.1.9.9.543.1.3.2.1.9',
'clmgmtDevCredCommandDefinition' => 'CISCO-LICENSE-MGMT-MIB::clmgmtDevCredCommand',
'clmgmtDevCredCommandState' => '1.3.6.1.4.1.9.9.543.1.3.2.1.10',
'clmgmtDevCredCommandStateDefinition' => 'CISCO-LICENSE-MGMT-MIB::ClmgmtLicenseActionState',
'clmgmtDevCredCommandFailCause' => '1.3.6.1.4.1.9.9.543.1.3.2.1.11',
'clmgmtDevCredCommandFailCauseDefinition' => 'CISCO-LICENSE-MGMT-MIB::clmgmtDevCredCommandFailCause',
'clmgmtDevCredStorageType' => '1.3.6.1.4.1.9.9.543.1.3.2.1.12',
'clmgmtDevCredRowStatus' => '1.3.6.1.4.1.9.9.543.1.3.2.1.13',
'clmgmtLicenseNotifObjects' => '1.3.6.1.4.1.9.9.543.1.4',
'clmgmtLicenseUsageNotifEnable' => '1.3.6.1.4.1.9.9.543.1.4.1',
'clmgmtLicenseDeploymentNotifEnable' => '1.3.6.1.4.1.9.9.543.1.4.2',
'clmgmtLicenseErrorNotifEnable' => '1.3.6.1.4.1.9.9.543.1.4.3',
'ciscoLicenseMgmtMIBConform' => '1.3.6.1.4.1.9.9.543.2',
'ciscoLicenseMgmtCompliances' => '1.3.6.1.4.1.9.9.543.2.1',
'ciscoLicenseMgmtGroups' => '1.3.6.1.4.1.9.9.543.2.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-LICENSE-MGMT-MIB'} = {
'ClmgmtLicenseActionFailCause' => {
'1' => 'none',
'2' => 'generalFailure',
'3' => 'transferProtocolNotSupported',
'4' => 'fileServerNotReachable',
'5' => 'unrecognizedEntPhysicalIndex',
'6' => 'invalidLicenseFilePath',
'7' => 'invalidLicenseFile',
'8' => 'invalidLicenseLine',
'9' => 'licenseAlreadyExists',
'10' => 'licenseNotValidForDevice',
'11' => 'invalidLicenseCount',
'12' => 'invalidLicensePeriod',
'13' => 'licenseInUse',
'14' => 'invalidLicenseStore',
'15' => 'licenseStorageFull',
'16' => 'invalidPermissionTicketFile',
'17' => 'invalidPermissionTicket',
'18' => 'invalidRehostTicketFile',
'19' => 'invalidRehostTicket',
'20' => 'invalidLicenseBackupFile',
'21' => 'licenseClearInProgress',
'22' => 'invalidLicenseEULAFile',
},
'ClmgmtLicenseTransferProtocol' => {
'1' => 'none',
'2' => 'local',
'3' => 'tftp',
'4' => 'ftp',
'5' => 'rcp',
'6' => 'http',
'7' => 'scp',
'8' => 'sftp',
},
'clmgmtDevCredCommand' => {
'1' => 'noOp',
'2' => 'getDeviceCredentials',
},
'clmgmtDevCredCommandFailCause' => {
'1' => 'none',
'2' => 'unknownError',
'3' => 'transferProtocolNotSupported',
'4' => 'fileServerNotReachable',
'5' => 'unrecognizedEntPhysicalIndex',
'6' => 'invalidFile',
},
'clmgmtLicenseAction' => {
'1' => 'noOp',
'2' => 'install',
'3' => 'clear',
'4' => 'processPermissionTicket',
'5' => 'regenerateLastRehostTicket',
'6' => 'backup',
'7' => 'generateEULA',
},
'clmgmtLicenseType' => {
'1' => 'demo',
'2' => 'extension',
'3' => 'gracePeriod',
'4' => 'permanent',
'5' => 'paidSubscription',
'6' => 'evaluationSubscription',
'7' => 'extensionSubscription',
'8' => 'evalRightToUse',
'9' => 'rightToUse',
'10' => 'permanentRightToUse',
},
'clmgmtLicenseStatus' => {
'1' => 'inactive',
'2' => 'notInUse',
'3' => 'inUse',
'4' => 'expiredInUse',
'5' => 'expiredNotInUse',
'6' => 'usageCountConsumed',
},
'ClmgmtLicenseActionState' => {
'1' => 'none',
'2' => 'pending',
'3' => 'inProgress',
'4' => 'successful',
'5' => 'partiallySuccessful',
'6' => 'failed',
},
};

View file

@ -0,0 +1,281 @@
package Monitoring::GLPlugin::SNMP::MibsAndOids::CISCOLWAPPHAMIB;
# -- CISCO-LWAPP-HA-MIB.my :
# -- Jan 2012, Gayathri
# --
# -- Copyright (c) 2007, 2014-2015 by Cisco Systems, Inc.
# LAST-UPDATED "201201051150Z"
# ...
# REVISION "201201241150Z"
# DESCRIPTION
# "Initial version of this MIB module. "
# ::= { ciscoMgmt 198888 }
#
# ...und irgendwann taucht dann das hier auf. Einfach so.
# Sowas kommt zufällig ans Tageslicht, weil ein check_nwc_health-Anwender
# seinen WLC von 8.5.135.0 auf Version 8.10.121.0 updatet und dadurch
# 1.3.6.1.4.1.9.9.198888 durch 1.3.6.1.4.1.9.9.843 ersetzt wurde.
#
# -- CISCO-LWAPP-HA-MIB.my :
# -- Jan 2012, Gayathri <--- Pappnase
# --
# -- Copyright (c) 2017-2018 by Cisco Systems, Inc.
# LAST-UPDATED "201703140000Z"
# ...
# REVISION "201703140000Z"
# DESCRIPTION
# "Initial version of this MIB module."
# ::= { ciscoMgmt 843 }
#
$Monitoring::GLPlugin::SNMP::MibsAndOids::origin->{'CISCO-LWAPP-HA-MIB'} = {
url => '',
name => 'CISCO-LWAPP-HA-MIB',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'CISCO-LWAPP-HA-MIB::2012'} =
'1.3.6.1.4.1.9.9.198888';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-LWAPP-HA-MIB::2012'} = {
ciscoLwappHaMIB => '1.3.6.1.4.1.9.9.198888',
ciscoLwappHaMIBObjects => '1.3.6.1.4.1.9.9.198888.0',
ciscoLwappHaGlobalConfig => '1.3.6.1.4.1.9.9.198888.0.1',
cLHaApSsoConfig => '1.3.6.1.4.1.9.9.198888.0.1.1',
cLHaPeerIpAddressType => '1.3.6.1.4.1.9.9.198888.0.1.2',
cLHaPeerIpAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaPeerIpAddress => '1.3.6.1.4.1.9.9.198888.0.1.3',
cLHaPeerIpAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaPeerIpAddressType)',
cLHaServicePortPeerIpAddressType => '1.3.6.1.4.1.9.9.198888.0.1.4',
cLHaServicePortPeerIpAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaServicePortPeerIpAddress => '1.3.6.1.4.1.9.9.198888.0.1.5',
cLHaServicePortPeerIpAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaServicePortPeerIpAddressType)',
cLHaServicePortPeerIpNetMaskType => '1.3.6.1.4.1.9.9.198888.0.1.6',
cLHaServicePortPeerIpNetMaskTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaServicePortPeerIpNetMask => '1.3.6.1.4.1.9.9.198888.0.1.7',
cLHaServicePortPeerIpNetMaskDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaServicePortPeerIpNetMaskType)',
cLHaRedundancyIpAddressType => '1.3.6.1.4.1.9.9.198888.0.1.8',
cLHaRedundancyIpAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaRedundancyIpAddress => '1.3.6.1.4.1.9.9.198888.0.1.9',
cLHaRedundancyIpAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaRedundancyIpAddressType)',
cLHaPeerMacAddress => '1.3.6.1.4.1.9.9.198888.0.1.10',
cLHaVirtualMacAddress => '1.3.6.1.4.1.9.9.198888.0.1.11',
cLHaPrimaryUnit => '1.3.6.1.4.1.9.9.198888.0.1.12',
cLHaPrimaryUnitDefinition => 'SNMPv2-TC-v1-MIB::TruthValue',
cLHaLinkEncryption => '1.3.6.1.4.1.9.9.198888.0.1.13',
cLHaNetworkFailOver => '1.3.6.1.4.1.9.9.198888.0.1.14',
cLHaNetworkFailOverDefinition => 'SNMPv2-TC-v1-MIB::TruthValue',
cLHaRFStatusUnitIp => '1.3.6.1.4.1.9.9.198888.0.1.15',
cLHaKATimeout => '1.3.6.1.4.1.9.9.198888.0.1.16',
cLHaKARetryCount => '1.3.6.1.4.1.9.9.198888.0.1.17',
cLHaGwRetryCount => '1.3.6.1.4.1.9.9.198888.0.1.18',
cLHaPeerSearchTimeout => '1.3.6.1.4.1.9.9.198888.0.1.19',
ciscoLwappHaNetworkConfig => '1.3.6.1.4.1.9.9.198888.0.2',
cLHaNetworkRoutePeerConfigTable => '1.3.6.1.4.1.9.9.198888.0.2.1',
cLHaNetworkRoutePeerConfigEntry => '1.3.6.1.4.1.9.9.198888.0.2.1.1',
cLHaNetworkRoutePeerIPAddressType => '1.3.6.1.4.1.9.9.198888.0.2.1.1.1',
cLHaNetworkRoutePeerIPAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaNetworkRoutePeerIPAddress => '1.3.6.1.4.1.9.9.198888.0.2.1.1.2',
cLHaNetworkRoutePeerIPAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaNetworkRoutePeerIPAddressType)',
cLHaNetworkRoutePeerIPNetmaskType => '1.3.6.1.4.1.9.9.198888.0.2.1.1.3',
cLHaNetworkRoutePeerIPNetmaskTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaNetworkRoutePeerIPNetmask => '1.3.6.1.4.1.9.9.198888.0.2.1.1.4',
cLHaNetworkRoutePeerIPNetmaskDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaNetworkRoutePeerIPNetmaskType)',
cLHaNetworkRoutePeerGatewayType => '1.3.6.1.4.1.9.9.198888.0.2.1.1.5',
cLHaNetworkRoutePeerGatewayTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaNetworkRoutePeerGateway => '1.3.6.1.4.1.9.9.198888.0.2.1.1.6',
cLHaNetworkRoutePeerGatewayDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaNetworkRoutePeerGatewayType)',
cLHaNetworkRoutePeerTransferStatus => '1.3.6.1.4.1.9.9.198888.0.2.1.1.7',
cLHaNetworkRoutePeerTransferStatusDefinition => 'CISCO-LWAPP-HA-MIB::cLHaNetworkRoutePeerTransferStatus',
cLHaNetworkRoutePeerRowStatus => '1.3.6.1.4.1.9.9.198888.0.2.1.1.8',
ciscoLwappHaMIBNotifs => '1.3.6.1.4.1.9.9.198888.0.3',
ciscoLwappHaNotificationVariable => '1.3.6.1.4.1.9.9.198888.0.4',
cLHaSecondaryControllerUsageTrapType => '1.3.6.1.4.1.9.9.198888.0.4.1',
cLHaSecondaryControllerUsageTrapTypeDefinition => 'CISCO-LWAPP-HA-MIB::cLHaSecondaryControllerUsageTrapType',
cLHaSecondaryControllerUsageDayCounter => '1.3.6.1.4.1.9.9.198888.0.4.2',
cLHaBulkSyncCompleteEventStr => '1.3.6.1.4.1.9.9.198888.0.4.3',
cLHaPeerHotStandbyEventStr => '1.3.6.1.4.1.9.9.198888.0.4.4',
ciscoLwappHaPeerStatisticsVariable => '1.3.6.1.4.1.9.9.198888.0.5',
cLHaSystemStatistics => '1.3.6.1.4.1.9.9.198888.0.5.1',
cLHaCpuStatistics => '1.3.6.1.4.1.9.9.198888.0.5.1.1',
cLHaAllCpuUsage => '1.3.6.1.4.1.9.9.198888.0.5.1.1.1',
cLHaPowerSupplyStatistics => '1.3.6.1.4.1.9.9.198888.0.5.1.2',
cLHaPowerSupply1Present => '1.3.6.1.4.1.9.9.198888.0.5.1.2.1',
cLHaPowerSupply1PresentDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply1Present',
cLHaPowerSupply1Operational => '1.3.6.1.4.1.9.9.198888.0.5.1.2.2',
cLHaPowerSupply1OperationalDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply1Operational',
cLHaPowerSupply2Present => '1.3.6.1.4.1.9.9.198888.0.5.1.2.3',
cLHaPowerSupply2PresentDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply2Present',
cLHaPowerSupply2Operational => '1.3.6.1.4.1.9.9.198888.0.5.1.2.4',
cLHaPowerSupply2OperationalDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply2Operational',
cLHaMemoryStatistics => '1.3.6.1.4.1.9.9.198888.0.5.1.3',
cLHaTotalSystemMemory => '1.3.6.1.4.1.9.9.198888.0.5.1.3.1',
cLHaFreeSystemMemory => '1.3.6.1.4.1.9.9.198888.0.5.1.3.2',
cLHaUsedSystemMemory => '1.3.6.1.4.1.9.9.198888.0.5.1.3.3',
cLHaAllocatedFromRtos => '1.3.6.1.4.1.9.9.198888.0.5.1.3.4',
cLHaChunksFree => '1.3.6.1.4.1.9.9.198888.0.5.1.3.5',
cLHaMmappedRegions => '1.3.6.1.4.1.9.9.198888.0.5.1.3.6',
cLHaSpaceInMmappedRegions => '1.3.6.1.4.1.9.9.198888.0.5.1.3.7',
cLHaTotalAllocatedSpace => '1.3.6.1.4.1.9.9.198888.0.5.1.3.8',
cLHaTotalNotInUseSpace => '1.3.6.1.4.1.9.9.198888.0.5.1.3.9',
cLHaTopMostReleasableSpace => '1.3.6.1.4.1.9.9.198888.0.5.1.3.10',
cLHaTotalAllocatedInclMmap => '1.3.6.1.4.1.9.9.198888.0.5.1.3.11',
cLHaTotalUsedInclMmap => '1.3.6.1.4.1.9.9.198888.0.5.1.3.12',
cLHaTotalFreeInclMmap => '1.3.6.1.4.1.9.9.198888.0.5.1.3.13',
ciscoLwappHaStatisticsVariable => '1.3.6.1.4.1.9.9.198888.0.6',
cLHaAvgPeerReachLatency => '1.3.6.1.4.1.9.9.198888.0.6.1',
cLHaAvgGwReachLatency => '1.3.6.1.4.1.9.9.198888.0.6.2',
cLHaBulkSyncStatus => '1.3.6.1.4.1.9.9.198888.0.6.3',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-LWAPP-HA-MIB::2012'} = {
cLHaSecondaryControllerUsageTrapType => {
'1' => 'usageStart',
'2' => 'usageComplete',
'3' => 'overUsage',
},
cLHaPowerSupply1Present => {
'0' => 'false',
'1' => 'true',
},
cLHaPowerSupply1Operational => {
'0' => 'false',
'1' => 'true',
},
cLHaPowerSupply2Present => {
'0' => 'false',
'1' => 'true',
},
cLHaPowerSupply2Operational => {
'0' => 'false',
'1' => 'true',
},
cLHaNetworkRoutePeerTransferStatus => {
'1' => 'initiate',
'2' => 'inProgress',
'3' => 'success',
'4' => 'failure',
'5' => 'timeout',
},
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::mib_ids->{'CISCO-LWAPP-HA-MIB::2017'} =
'1.3.6.1.4.1.9.9.843';
$Monitoring::GLPlugin::SNMP::MibsAndOids::mibs_and_oids->{'CISCO-LWAPP-HA-MIB::2017'} = {
ciscoLwappHaMIB => '1.3.6.1.4.1.9.9.843',
ciscoLwappHaMIBNotifs => '1.3.6.1.4.1.9.9.843.0',
ciscoLwappHaMIBObjects => '1.3.6.1.4.1.9.9.843.1',
ciscoLwappHaGlobalConfig => '1.3.6.1.4.1.9.9.843.1.1',
cLHaApSsoConfig => '1.3.6.1.4.1.9.9.843.1.1.1',
cLHaPeerIpAddressType => '1.3.6.1.4.1.9.9.843.1.1.2',
cLHaPeerIpAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaPeerIpAddress => '1.3.6.1.4.1.9.9.843.1.1.3',
cLHaPeerIpAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaPeerIpAddressType)',
cLHaServicePortPeerIpAddressType => '1.3.6.1.4.1.9.9.843.1.1.4',
cLHaServicePortPeerIpAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaServicePortPeerIpAddress => '1.3.6.1.4.1.9.9.843.1.1.5',
cLHaServicePortPeerIpAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaServicePortPeerIpAddressType)',
cLHaServicePortPeerIpNetMaskType => '1.3.6.1.4.1.9.9.843.1.1.6',
cLHaServicePortPeerIpNetMaskTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaServicePortPeerIpNetMask => '1.3.6.1.4.1.9.9.843.1.1.7',
cLHaServicePortPeerIpNetMaskDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaServicePortPeerIpNetMaskType)',
cLHaRedundancyIpAddressType => '1.3.6.1.4.1.9.9.843.1.1.8',
cLHaRedundancyIpAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaRedundancyIpAddress => '1.3.6.1.4.1.9.9.843.1.1.9',
cLHaRedundancyIpAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaRedundancyIpAddressType)',
cLHaPeerMacAddress => '1.3.6.1.4.1.9.9.843.1.1.10',
cLHaVirtualMacAddress => '1.3.6.1.4.1.9.9.843.1.1.11',
cLHaPrimaryUnit => '1.3.6.1.4.1.9.9.843.1.1.12',
cLHaPrimaryUnitDefinition => 'SNMPv2-TC-v1-MIB::TruthValue',
cLHaLinkEncryption => '1.3.6.1.4.1.9.9.843.1.1.13',
cLHaNetworkFailOver => '1.3.6.1.4.1.9.9.843.1.1.14',
cLHaNetworkFailOverDefinition => 'SNMPv2-TC-v1-MIB::TruthValue',
cLHaRFStatusUnitIp => '1.3.6.1.4.1.9.9.843.1.1.15',
cLHaKATimeout => '1.3.6.1.4.1.9.9.843.1.1.16',
cLHaKARetryCount => '1.3.6.1.4.1.9.9.843.1.1.17',
cLHaGwRetryCount => '1.3.6.1.4.1.9.9.843.1.1.18',
cLHaPeerSearchTimeout => '1.3.6.1.4.1.9.9.843.1.1.19',
cLHaRFStatusUnitIpType => '1.3.6.1.4.1.9.9.843.1.1.20',
ciscoLwappHaNetworkConfig => '1.3.6.1.4.1.9.9.843.1.2',
cLHaNetworkRoutePeerConfigTable => '1.3.6.1.4.1.9.9.843.1.2.1',
cLHaNetworkRoutePeerConfigEntry => '1.3.6.1.4.1.9.9.843.1.2.1.1',
cLHaNetworkRoutePeerIPAddressType => '1.3.6.1.4.1.9.9.843.1.2.1.1.1',
cLHaNetworkRoutePeerIPAddressTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaNetworkRoutePeerIPAddress => '1.3.6.1.4.1.9.9.843.1.2.1.1.2',
cLHaNetworkRoutePeerIPAddressDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaNetworkRoutePeerIPAddressType)',
cLHaNetworkRoutePeerIPNetmaskType => '1.3.6.1.4.1.9.9.843.1.2.1.1.3',
cLHaNetworkRoutePeerIPNetmaskTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaNetworkRoutePeerIPNetmask => '1.3.6.1.4.1.9.9.843.1.2.1.1.4',
cLHaNetworkRoutePeerIPNetmaskDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaNetworkRoutePeerIPNetmaskType)',
cLHaNetworkRoutePeerGatewayType => '1.3.6.1.4.1.9.9.843.1.2.1.1.5',
cLHaNetworkRoutePeerGatewayTypeDefinition => 'INET-ADDRESS-MIB::InetAddressType',
cLHaNetworkRoutePeerGateway => '1.3.6.1.4.1.9.9.843.1.2.1.1.6',
cLHaNetworkRoutePeerGatewayDefinition => 'INET-ADDRESS-MIB::InetAddress(cLHaNetworkRoutePeerGatewayType)',
cLHaNetworkRoutePeerTransferStatus => '1.3.6.1.4.1.9.9.843.1.2.1.1.7',
cLHaNetworkRoutePeerTransferStatusDefinition => 'CISCO-LWAPP-HA-MIB::cLHaNetworkRoutePeerTransferStatus',
cLHaNetworkRoutePeerRowStatus => '1.3.6.1.4.1.9.9.843.1.2.1.1.8',
ciscoLwappHaNotificationVariable => '1.3.6.1.4.1.9.9.843.1.3',
cLHaSecondaryControllerUsageTrapType => '1.3.6.1.4.1.9.9.843.1.3.1',
cLHaSecondaryControllerUsageTrapTypeDefinition => 'CISCO-LWAPP-HA-MIB::cLHaSecondaryControllerUsageTrapType',
cLHaSecondaryControllerUsageDayCounter => '1.3.6.1.4.1.9.9.843.1.3.2',
cLHaBulkSyncCompleteEvent => '1.3.6.1.4.1.9.9.843.1.3.3',
cLHaBulkSyncCompleteEventDefinition => 'CISCO-LWAPP-HA-MIB::cLHaBulkSyncCompleteEvent',
cLHaPeerHotStandbyEvent => '1.3.6.1.4.1.9.9.843.1.3.4',
cLHaPeerHotStandbyEventDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPeerHotStandbyEvent',
ciscoLwappHaPeerStatisticsVariable => '1.3.6.1.4.1.9.9.843.1.4',
ciscoLwappHaSystemStatistics => '1.3.6.1.4.1.9.9.843.1.4.1',
ciscoLwappHaCpuStatistics => '1.3.6.1.4.1.9.9.843.1.4.1.1',
cLHaAllCpuUsage => '1.3.6.1.4.1.9.9.843.1.4.1.1.1',
ciscoLwappHaPowerSupplyStatistics => '1.3.6.1.4.1.9.9.843.1.4.1.2',
cLHaPowerSupply1Present => '1.3.6.1.4.1.9.9.843.1.4.1.2.1',
cLHaPowerSupply1PresentDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply1Present',
cLHaPowerSupply1Operational => '1.3.6.1.4.1.9.9.843.1.4.1.2.2',
cLHaPowerSupply1OperationalDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply1Operational',
cLHaPowerSupply2Present => '1.3.6.1.4.1.9.9.843.1.4.1.2.3',
cLHaPowerSupply2PresentDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply2Present',
cLHaPowerSupply2Operational => '1.3.6.1.4.1.9.9.843.1.4.1.2.4',
cLHaPowerSupply2OperationalDefinition => 'CISCO-LWAPP-HA-MIB::cLHaPowerSupply2Operational',
ciscoLwappHaMemoryStatistics => '1.3.6.1.4.1.9.9.843.1.4.1.3',
cLHaTotalSystemMemory => '1.3.6.1.4.1.9.9.843.1.4.1.3.1',
cLHaFreeSystemMemory => '1.3.6.1.4.1.9.9.843.1.4.1.3.2',
cLHaUsedSystemMemory => '1.3.6.1.4.1.9.9.843.1.4.1.3.3',
cLHaAllocatedFromRtos => '1.3.6.1.4.1.9.9.843.1.4.1.3.4',
cLHaChunksFree => '1.3.6.1.4.1.9.9.843.1.4.1.3.5',
cLHaMmappedRegions => '1.3.6.1.4.1.9.9.843.1.4.1.3.6',
cLHaSpaceInMmappedRegions => '1.3.6.1.4.1.9.9.843.1.4.1.3.7',
cLHaTotalAllocatedSpace => '1.3.6.1.4.1.9.9.843.1.4.1.3.8',
cLHaTotalNotInUseSpace => '1.3.6.1.4.1.9.9.843.1.4.1.3.9',
cLHaTopMostReleasableSpace => '1.3.6.1.4.1.9.9.843.1.4.1.3.10',
cLHaTotalAllocatedInclMmap => '1.3.6.1.4.1.9.9.843.1.4.1.3.11',
cLHaTotalUsedMmap => '1.3.6.1.4.1.9.9.843.1.4.1.3.12',
cLHaTotalFreeInclMmap => '1.3.6.1.4.1.9.9.843.1.4.1.3.13',
ciscoLwappHaStatisticsVariable => '1.3.6.1.4.1.9.9.843.1.5',
cLHaAvgPeerReachLatency => '1.3.6.1.4.1.9.9.843.1.5.1',
cLHaAvgGwReachLatency => '1.3.6.1.4.1.9.9.843.1.5.2',
cLHaBulkSyncStatus => '1.3.6.1.4.1.9.9.843.1.5.3',
ciscoLwappHaMIBConform => '1.3.6.1.4.1.9.9.843.2',
ciscoLwappHaMIBCompliances => '1.3.6.1.4.1.9.9.843.2.1',
ciscoLwappHaMIBGroups => '1.3.6.1.4.1.9.9.843.2.2',
};
$Monitoring::GLPlugin::SNMP::MibsAndOids::definitions->{'CISCO-LWAPP-HA-MIB::2017'} = {
cLHaNetworkRoutePeerTransferStatus => {
'1' => 'initiate',
'2' => 'inProgress',
'3' => 'success',
'4' => 'failure',
'5' => 'timeout',
},
cLHaPeerHotStandbyEvent => {
'1' => 'haPeerHotstandby',
},
cLHaBulkSyncCompleteEvent => {
'1' => 'bulkSyncComplete',
},
cLHaSecondaryControllerUsageTrapType => {
'1' => 'usageStart',
'2' => 'usageComplete',
'3' => 'overUsage',
},
};

Some files were not shown because too many files have changed in this diff Show more