Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Commit

Permalink
Initial adding of madrisan's nagios-plugins-linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Palfrader committed Sep 10, 2021
1 parent 8d4c239 commit 44c2d26
Show file tree
Hide file tree
Showing 203 changed files with 46,810 additions and 0 deletions.
49 changes: 49 additions & 0 deletions madrisan-nagios-plugins-linux/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

PD = nagios-plugins-linux

PLUGINS += check_clock
PLUGINS += check_cpu
PLUGINS += check_cpufreq
PLUGINS += check_cswch
PLUGINS += check_fc
PLUGINS += check_ifmountfs
PLUGINS += check_intr
PLUGINS += check_iowait
PLUGINS += check_nbprocs
PLUGINS += check_network
PLUGINS += check_network_collisions
PLUGINS += check_network_dropped
PLUGINS += check_network_errors
PLUGINS += check_network_multicast
PLUGINS += check_paging
PLUGINS += check_pressure
PLUGINS += check_readonlyfs
PLUGINS += check_tcpcount
PLUGINS += check_temperature

PLUGINS_RENAME += check_load
PLUGINS_RENAME += check_memory
PLUGINS_RENAME += check_multipath
PLUGINS_RENAME += check_swap
PLUGINS_RENAME += check_uptime
PLUGINS_RENAME += check_users

all:
cd ${PD} && dh_autoreconf
mkdir build-tree
cd build-tree && \
../${PD}/configure --prefix=/usr --libexecdir=/usr/lib/nagios/plugins && \
$(MAKE)

install:
install -d $(DESTDIR)/usr/lib/nagios
for check in $(PLUGINS); do \
install -m 755 -o root -g root build-tree/plugins/$${check} ${DESTDIR}/usr/lib/nagios || exit 1; \
done; true

for check in $(PLUGINS_RENAME); do \
install -m 755 -o root -g root build-tree/plugins/$${check} ${DESTDIR}/usr/lib/nagios/check_madrisan_$${check#check_} || exit 1; \
done; true

clean:
rm -rf build-tree
6 changes: 6 additions & 0 deletions madrisan-nagios-plugins-linux/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Watch: https://github.com/madrisan/nagios-plugins-linux/commit/master >commit <[^>]*>([0-9a-f]+)<
Version: bbbdc5279cd2569d4c6b5e0ed19d12c082e322ad
Homepage: https://github.com/madrisan/nagios-plugins-linux
Uploaders: Peter Palfrader <weasel@debian.org>
Description: Nagios-compatible Plugins for Linux
Various binary plugins for monitoring (physical and virtual) Linux hosts with Nagios and Nagios-compatible monitoring systems like Icinga and Naemon.
11 changes: 11 additions & 0 deletions madrisan-nagios-plugins-linux/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright (c) 2013-2021 Davide Madrisan <davide.madrisan@gmail.com>

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 3 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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "2"
plugins:
duplication:
enabled: true
config:
languages:
- c
fixme:
enabled: true
config:
strings:
- FIXME
gnu-complexity:
enabled: true
config:
threshold: 30
shellcheck:
enabled: true
exclude_patterns:
- "**.sample"
- compile
- config.sub
- depcomp
- install-sh
- libtool
- ltmain.sh
- m4/
- packages/
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
configure linguist-generated=true
config.* linguist-vendored
depcomp linguist-vendored
install-sh linguist-vendored
missing linguist-vendored
test-driver linguist-vendored
ltmain.sh linguist-vendored
libtool linguist-vendored
*.psd filter=lfs diff=lfs merge=lfs -text
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve
title: "[Bug]"
labels: bug
assignees: ''

---

# 🐛 Bug
## Describe the bug
A clear and concise description of what the bug is.

## How to reproduce
Steps to reproduce the behaviour:
1. Options passed to ./configure at build time (if applicable)
2. A way to recreate the problem
3. Command line to enter
4. The exact output printed by the plugin

## Expected behaviour
A clear and concise description of what you expected to happen.

## Additional context
- Linux distribution
- Version [e.g. 27]
- Add any other context about the problem here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "\U0001F680 Feature request"
about: Suggest an idea for a new feature in Nagios Plugins for Linux
title: "[Feature Request]"
labels: enhancement
assignees: ''

---

# 🚀 Feature Request

## Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Describe the solution you'd like
A clear and concise description of what you want to happen.

## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

## Additional context
Add any other context or screenshots about the feature request here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build check

on:
push:
paths-ignore:
- '**.md'
pull_request:
types: [assigned, edited, opened, synchronize, reopened]

jobs:
build:
runs-on: ubuntu-latest
container: ${{ matrix.container }}

strategy:
fail-fast: false
matrix:
container:
- 'alpine:3.14'
- 'centos:8'
- 'debian:buster'
- 'fedora:34'
- 'ubuntu:21.04'

steps:
- uses: actions/checkout@v2

- id: install_deps
run: |
case "${{ matrix.container }}" in
alpine*)
apk update
apk add autoconf automake bzip2 curl-dev file gcc libtool linux-headers make m4 musl-dev tar xz
;;
debian*|ubuntu*)
export DEBIAN_FRONTEND=noninteractive
apt-get update -q
apt-get install -q -y --no-install-recommends autoconf automake bzip2 gcc libcurl4-gnutls-dev libtool m4 make pkg-config xz-utils
;;
centos*)
dnf -y update
dnf -y install autoconf automake bzip2 gcc glibc-devel libcurl-devel libtool make m4 xz
;;
fedora*)
dnf -y update
dnf -y install autoconf automake bzip2 gcc glibc-devel libcurl-devel libvarlink-devel libtool make m4 xz
;;
esac
- id: configure
run: |
autoreconf --install
./configure --enable-debug
- id: make
run: |
make
make check
make distcheck
40 changes: 40 additions & 0 deletions madrisan-nagios-plugins-linux/nagios-plugins-linux/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Object and libray files
**/*.[ao]
**/*.l[ao]
# Shared objects
*.so
*.so.*
*.dylib
# Files creared by autotools
.deps
.libs
**/*.log
aclocal.m4
autom4te.cache
compile
compile.scan
config.cache
config.guess
config.h
config.h.in
config.hin
config.hin~
config.status
configure
configure.scan
libtool
stamp-h1
**/Makefile.in
**/Makefile
# Build files
*.spec
*.tar.bz2
*.tar.xz
# Test-build files
tests-build/pcks
# Binary files created by make {,check}
plugins/check_*
!plugins/check_*.c
tests/ts*
!tests/ts*.c
!tests/ts*.data
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "packages/docker-shell-helpers"]
path = packages/docker-shell-helpers
url = https://github.com/madrisan/docker-shell-helpers
42 changes: 42 additions & 0 deletions madrisan-nagios-plugins-linux/nagios-plugins-linux/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
language: c
compiler:
- gcc
- clang

env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "WqpTr19IWav//MQEQ7RcerdTVhbYt9faBh2QoEZmRLDPm+0RBidw1kvP73Di9pozURqisdB1P5LJ5eVFuocaD2eM+pO4399hHD48QsupDoLxgcJfmeP5YfT7Kmq97vyOs5dV01uopRMTJ9SDD1rt2oia+Ez6B/AeTCEpENb/76Y="

sudo: false

matrix:
exclude:
- compiler: clang
env: COVERITY_SCAN_BRANCH=1
# Coverity Scan should only run once and it might fail,
# because the number of times its runs is limited per week.
# We only check when compiled with gcc.
allow_failures:
- env: COVERITY_SCAN_BRANCH=1

addons:
coverity_scan:
project:
name: "madrisan/nagios-plugins-linux"
notification_email: davide.madrisan@gmail.com
# Commands to prepare for build_command
build_command_prepend: "autoreconf -f -v -Wall -i -Im4 && ./configure"
# This command will be added as an argument to "cov-build" to compile
# the project for analisys
build_command: "make clean all"
branch_pattern: coverity_scan

script:
- |
if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then
[ -f ./Makefile ] || autoreconf -f -v -Wall -i -Im4 && ./configure
make clean all
VERBOSE=1 make check
fi
49 changes: 49 additions & 0 deletions madrisan-nagios-plugins-linux/nagios-plugins-linux/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Author:
Davide Madrisan <davide.madrisan@gmail.com>

External libraries:
Jsmn (pronounced like 'jasmine'), a world fastest JSON parser/tokenizer
* Author: Serge Zaitsev
* Git repository: https://github.com/zserge/jsmn
* Files: include/jsmn.h
* SPDX-License-Identifier: MIT

Contributors:
flexdev - https://github.com/flexdev
Bug report and patch (several plugins)
chr15p - https://github.com/chr15p
Bug report and patch (check_multipath)

Some code and coding styles/ideas belong to the following open source projects:

* cpufrequtils https://www.kernel.org/pub/linux/utils/kernel/cpufreq/
SPDX-License-Identifier: GPL-2.0-only

* gnulib http://git.savannah.gnu.org/gitweb/?p=gnulib.git
SPDX-License-Identifier: GPL-3.0-or-later / LGPL-3.0-or-later

* kmod http://git.kernel.org/cgit/utils/kernel/kmod/kmod.git
SPDX-License-Identifier: GPL-2.0-only

* libabc https://git.kernel.org/cgit/linux/kernel/git/kay/libabc.git
SPDX-License-Identifier: GPL-2.0-only (with an unrestricted usage clause)

* libvirt http://libvirt.org/
SPDX-License-Identifier: GPL-2.1-only / LGPL-2.1-only

* nagios plugins https://github.com/nagios-plugins/nagios-plugins
SPDX-License-Identifier: GPL-3.0-or-later

* procps https://gitlab.com/procps-ng/procps/
SPDX-License-Identifier: GPL-2.0-only / LGPL-2.0-only (libprocps)

* util-linux https://github.com/karelzak/util-linux
SPDX-License-Identifier: GPL-2.0-only

* pcp https://github.com/performancecopilot/pcp
SPDX-License-Identifier: LGPL-2.1-or-later

and also to Mickael Kerrisk of "The Linux Programming Interface":

* tlpi http://man7.org/tlpi/code/
SPDX-License-Identifier: AGPL-3.0
Loading

0 comments on commit 44c2d26

Please sign in to comment.