Coder Social home page Coder Social logo

linuxfabrik / monitoring-plugins Goto Github PK

View Code? Open in Web Editor NEW
209.0 17.0 47.0 23 MB

220+ check plugins for Icinga and other Nagios-compatible monitoring applications. Each plugin is a standalone command line tool (written in Python) that provides a specific type of check.

Home Page: https://linuxfabrik.ch

License: The Unlicense

Python 98.89% Shell 0.99% PHP 0.12%
centos rhel fedora debian ubuntu linux monitoring monitoring-plugins icinga icinga2

monitoring-plugins's People

Contributors

0x446 avatar berrnd avatar bzblf avatar dissiyt avatar djmcd89 avatar dorkmaneuver avatar epura avatar geertsky avatar kbucheli avatar leo-pempera avatar lfchris avatar lklg avatar markuslf avatar mrimann avatar navidsassan avatar pierrot-la-menace avatar sandrolf avatar slalomsk8er avatar snejpro avatar soulsymphonies avatar thesamech avatar vnovakovic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monitoring-plugins's Issues

borgbackup: Improve error handling

There should be an nice message when create_rc or prune_rc are not found in the borg log file, not a traceback.

Traceback (most recent call last):
File "/usr/lib64/nagios/plugins/borgbackup", line 130, in <module>
    main()
  File "/usr/lib64/nagios/plugins/borgbackup", line 99, in main
    create_rc_state = evaluate_greater(create_rc, 2, None)
UnboundLocalError: local variable 'create_rc' referenced before assignment

disk-io: ValueError: not sure how to interpret line

In GitLab by @markuslf on Feb 27, 2020, 20:47

  File "disk-io/disk-io", line 182, in <module>
    main()
  File "disk-io/disk-io", line 103, in main
    current_data = psutil.disk_io_counters(perdisk=True)
  File "/usr/lib64/python2.7/site-packages/psutil/__init__.py", line 2014, in disk_io_counters
    rawdict = _psplatform.disk_io_counters()
  File "/usr/lib64/python2.7/site-packages/psutil/_pslinux.py", line 1076, in disk_io_counters
    raise ValueError("not sure how to interpret line %r" % line)
ValueError: not sure how to interpret line '   8       0 sda 117611 95370 6965839 38221 261613 160604 8232403 192966 0 176554 129885 0 0 0 0\n'

needs-restarting needs sudo-rights

In GitLab by @sandrolf on Feb 14, 2020, 17:21

[sandro.lang@fedora checks-linux] $ needs-restarting/needs-restarting 
Bash command `needs-restarting` failed.
Stdout: 
Stderr: Failed to read PID 1's smaps.
Failed to read PID 516's smaps.
Failed to read PID 531's smaps.
Failed to read PID 702's smaps.
Failed to read PID 723's smaps.
Failed to read PID 724's smaps.
Failed to read PID 725's smaps.
Failed to read PID 726's smaps.
Failed to read PID 727's smaps.
Failed to read PID 730's smaps.
Failed to read PID 736's smaps.
Failed to read PID 737's smaps.
Failed to read PID 740's smaps.
Failed to read PID 741's smaps.
Failed to read PID 742's smaps.
Failed to read PID 743's smaps.
Failed to read PID 744's smaps.
Failed to read PID 745's smaps.
Failed to read PID 748's smaps.
Failed to read PID 781's smaps.
Failed to read PID 782's smaps.
Failed to read PID 786's smaps.
Failed to read PID 792's smaps.
Failed to read PID 809's smaps.
Failed to read PID 822's smaps.
Failed to read PID 839's smaps.
Failed to read PID 840's smaps.
Failed to read PID 841's smaps.
Failed to read PID 843's smaps.
Failed to read PID 867's smaps.
Failed to read PID 999's smaps.
Failed to read PID 1019's smaps.
Failed to read PID 1038's smaps.
Failed to read PID 1040's smaps.
Failed to read PID 1041's smaps.
Failed to read PID 1058's smaps.
Failed to read PID 1076's smaps.
Failed to read PID 1100's smaps.
Failed to read PID 1514's smaps.
Failed to read PID 1624's smaps.
Failed to read PID 1819's smaps.
Failed to read PID 1820's smaps.
Failed to read PID 2145's smaps.
Failed to read PID 2652's smaps.
Failed to read PID 3092's smaps.
Failed to read PID 3322's smaps.
Failed to read PID 3336's smaps.
Failed to read PID 3353's smaps.
Failed to read PID 3433's smaps.
Failed to read PID 3695's smaps.
Failed to read PID 4037's smaps.
Failed to read PID 4307's smaps.
Failed to read PID 13590's smaps.
Failed to read PID 13593's smaps.
Failed to read PID 13596's smaps.
Failed to read PID 13599's smaps.
Failed to read PID 13602's smaps.
Failed to read PID 13605's smaps.
Failed to read PID 13608's smaps.
Failed to read PID 13916's smaps.

[sandro.lang@fedora checks-linux] $ sudo needs-restarting/needs-restarting 
No system or service restart needed

file-ownership: IndexError: list index out of range

In GitLab by @sandrolf on Feb 15, 2020, 18:26

[18:24:32 root@infra /usr/lib64/nagios/plugins/lf/checks-linux]$ file-ownership/file-ownership --filename /tmp/cpu-usage.db 
Traceback (most recent call last):
  File "file-ownership/file-ownership", line 116, in <module>
    main()
  File "file-ownership/file-ownership", line 76, in main
    path = line[1]
IndexError: list index out of range

defaults: define order of arguments (cosmetics :) )

In GitLab by @sandrolf on Feb 15, 2020, 18:31

[18:27:38 root@infra /usr/lib64/nagios/plugins/lf/checks-linux]$ fs-file-usage/fs-file-usage --help
usage: fs-file-usage [-h] [-c CRIT] [-V] [-w WARN]

Checks the number of files presently opened, in percent.

optional arguments:
  -h, --help            show this help message and exit
  -c CRIT, --critical CRIT
                        Set the critical threshold file number usage
                        percentage. Default: 95
  -V, --version         show program's version number and exit
  -w WARN, --warning WARN
                        Set the warning threshold file number usage
                        percentage. Default: 90

[18:27:43 root@infra /usr/lib64/nagios/plugins/lf/checks-linux]$ file-size/file-size --filename /tmp/cpu-usage.db --help
usage: file-size [-h] [-V] [-c CRIT] --filename FILE [-w WARN]

Checks the size of a file, in bytes.

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -c CRIT, --critical CRIT
                        Set the critical size threshold in bytes. Default: >=
                        1073741824 (1G)
  --filename FILE       File name to check.
  -w WARN, --warning WARN
                        Set the warning size threshold in bytes. Default: >=
                        104857600 (100M)

disk-smart: UnboundLocalError: local variable 'raw_value' referenced before assignment

In GitLab by @markuslf on Feb 9, 2020, 09:27

Traceback (most recent call last): File "disk-smart/disk-smart", line 573, in <module> main() File "disk-smart/disk-smart", line 319, in main perfdata += unpack_perfdata('{}_{}_{}'.format(perfdata_prefix, split_line[0], split_line[1]), raw_value, None, None, None, 0, 100) UnboundLocalError: local variable 'raw_value' referenced before assignment

disk-io: NameError: global name 'Data' is not defined

In GitLab by @sandrolf on Feb 15, 2020, 18:08


[18:05:52 root@infra /usr/lib64/nagios/plugins/lf/checks-linux]$ disk-io/disk-io 
Waiting for the latest data...

‌Disk        ║ Write Rate  ║ Read Rate
════════════╬═════════════╬═══════════|
[18:06:32 root@infra /usr/lib64/nagios/plugins/lf/checks-linux]$ disk-io/disk-io 
Traceback (most recent call last):
  File "disk-io/disk-io", line 183, in <module>
    main()
  File "disk-io/disk-io", line 128, in main
    write_rate_data = Data('{}_write_rate'.format(disk), write_rate, WRITE_WARN, WRITE_CRIT)
NameError: global name 'Data' is not defined

rpm-lastactivity: error

In GitLab by @sandrolf on Feb 16, 2020, 17:49

[17:30:32 root@infra /usr/lib64/nagios/plugins/lf/checks-linux]$ rpm-lastactivity/rpm-lastactivity -w 0
Last rpm/yum/dnf activity is more than 0 days ago.

[17:35:41 root@infra /usr/lib64/nagios/plugins/lf/checks-linux]$ rpm-lastactivity/rpm-lastactivity 
Last rpm/yum/dnf activity is below the given thresholds (90d/365d).

[17:36:43 root@infra /usr/lib64/nagios/plugins/lf/checks-linux]$ tail -n 1 /var/log/yum.log
Feb 15 18:41:48 Updated: iprutils-2.4.17.1-3.el7_7.x86_64

nextcloud-security-scan re-check possible?

In GitLab by @sandrolf on Feb 14, 2020, 17:25

[sandro.lang@fedora checks-linux] $ nextcloud-security-scan/nextcloud-security-scan -u cloud.langzh.ch
"A+" rating for cloud.langzh.ch, checked at 2020-02-01, on Nextcloud v17.0.3.1.

[sandro.lang@fedora checks-linux] $ date
Fr Feb 14 17:24:51 CET 2020

lib: function names and organization of library (to be discussed)

In GitLab by @markuslf on Feb 21, 2020, 15:22

rename some functions from > to:

  • define_args > get_options
  • parsed > options
  • unpack_perfdata > format_perfdata
  • filter_input > filter_values (has nothing to do with input, but is an array function)
  • get_greater_state > get_most_significant_state

other functions or abbreviations:

  • set_thresholds
  • get_status
  • stats (instead of "statistics")
  • msgs (abbreviation for "messages")

put in a library:

  • is_update_on_github_available (nextcloud, rocket)
  • get_latest_version_from_github (nextcloud, rocket)

Libraries - just one?

  • utils.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.