All Projects → BornToBeRoot → check_nextcloud

BornToBeRoot / check_nextcloud

Licence: AGPL-3.0 license
Nagios/Centreon plugin for nextcloud serverinfo API (https://github.com/nextcloud/serverinfo)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to check nextcloud

nagmapReborn
Nagmap Reborn - Standalone integration with some server monitoring systems providing a user-friendly interface through geographic visualization.
Stars: ✭ 19 (-13.64%)
Mutual labels:  nagios, centreon
nagiosplugin
A Python class library which helps with writing Nagios (Icinga) compatible plugins.
Stars: ✭ 19 (-13.64%)
Mutual labels:  nagios, nagios-plugin
OrganizeMediaFiles
a collection of Python scripts that help you organize media files into a directory tree "year/month" based on metadata , using exiftool
Stars: ✭ 24 (+9.09%)
Mutual labels:  nextcloud, python-script
check netscaler
A Nagios Plugin written in Perl for the Citrix ADC (formerly Citrix NetScaler). It uses the NetScaler NITRO API.
Stars: ✭ 36 (+63.64%)
Mutual labels:  nagios, nagios-plugin
snmp notifier
A webhook to relay Prometheus alerts as SNMP traps, because sometimes, you have to deal with legacy
Stars: ✭ 33 (+50%)
Mutual labels:  nagios, centreon
alerta-contrib
Contributed integrations, plugins and custom webhooks
Stars: ✭ 107 (+386.36%)
Mutual labels:  nagios
m3u8-downloader
Download the ts files according to the given m3u8 file.
Stars: ✭ 21 (-4.55%)
Mutual labels:  python-script
realopinsight
✔️ Measure and observe end-user applications availability - Define and track SLA/SLO targets through Prometheus-alike metrics and built-in reports - Kubernetes®, Zabbix®, Nagios®.
Stars: ✭ 55 (+150%)
Mutual labels:  nagios
nextcloud-docker-compose
☁️ Spin up a Nextcloud instance with automatied backups and SSL certificate issuance.
Stars: ✭ 69 (+213.64%)
Mutual labels:  nextcloud
talk-ios
📱😀 Video & audio calls through Nextcloud on iOS
Stars: ✭ 99 (+350%)
Mutual labels:  nextcloud
Awesome Python Scripts
🚀 Curated collection of Awesome Python Scripts which will make you go wow. Dive into this world of 360+ scripts. Feel free to contribute. Show your support by ✨this repository.
Stars: ✭ 198 (+800%)
Mutual labels:  python-script
nextcloud-exporter
Prometheus exporter for Nextcloud servers.
Stars: ✭ 134 (+509.09%)
Mutual labels:  nextcloud
Monitoring-Livestatus
Livestatus Perl API to access runtime data from Nagios, Naemon, Icinga and Shinken.
Stars: ✭ 26 (+18.18%)
Mutual labels:  nagios
mypaas
MyPaas is an Ansible playbook for startups or small companies which want to build a modern and fully automated infrastructure.
Stars: ✭ 24 (+9.09%)
Mutual labels:  nextcloud
Mr.Holmes
🔍 A Complete Osint Tool
Stars: ✭ 307 (+1295.45%)
Mutual labels:  python-script
icinga-domain-expiration-plugin
Icinga2/Nagios plugin for checking domain expiration
Stars: ✭ 24 (+9.09%)
Mutual labels:  nagios-plugin
my-libs-and-samples
☕️ Automated scripts for improving coding mood(Python/Shell)
Stars: ✭ 25 (+13.64%)
Mutual labels:  python-script
wp-serverinfo
Display your host's PHP, MYSQL & memcached (if installed) information on your WordPress dashboard.
Stars: ✭ 15 (-31.82%)
Mutual labels:  serverinfo
pypi-tools
Command-line Python scripts to do things with PyPI
Stars: ✭ 18 (-18.18%)
Mutual labels:  python-script
sharepoint
💾 Nextcloud SharePoint Backend for External storages
Stars: ✭ 16 (-27.27%)
Mutual labels:  nextcloud

Nagios/Centron check | Nextcloud serverinfo

Nagios/Centreon plugin for nextcloud serverinfo API (https://github.com/nextcloud/serverinfo)

This branch contains the check for Python 3. A version for Python 2.7 can be found here.

Syntax / Help

./check_nextcloud.py -u username -p password -H cloud.example.com -c [system|storage|shares|webserver|php|database|users|apps]


Options:
  -h, --help            show this help message and exit
  -v, --version         Print the version of this script
  -u USERNAME, --username=USERNAME
                        Username of the user with administrative permissions
                        on the nextcloud server
  -p PASSWORD, --password=PASSWORD
                        Password of the user
  -t TOKEN, --nc-token=TOKEN
                        NC-Token for the Serverinfo API
  -H HOSTNAME, --hostname=HOSTNAME
                        Nextcloud server address (make sure that the address
                        is a trusted domain in the config.php)
  -c CHECK, --check=CHECK
                        The thing you want to check
                        [system|storage|shares|webserver|php|database|activeUsers|uploadFilesize|apps]
  --upload-filesize     Filesize in MiB, GiB without spaces (default="512.0GiB")
  --protocol=PROTOCOL   Protocol you want to use [http|https]
                        (default="https")
  --ignore-proxy        Ignore any configured proxy server on this system for
                        this request
  --api-url=API_URL     Url of the api
                        (default="/ocs/v2.php/apps/serverinfo/api/v1/info")

Install

  • Copy the check (python script) in your nagios/centreon plugins folder
  • Create a check with the following command line:
    $USER1$/plugins_custom/check_nextcloud.py -u $_HOSTCLOUDUSER$ -p $_HOSTCLOUDPWD$ -H $HOSTNAME$ -c $ARG1$ --ignore-proxy
    
    or for the check: uploadFilesize
    $USER1$/plugins_custom/check_nextcloud.py -u $_HOSTCLOUDUSER$ -p $_HOSTCLOUDPWD$ -H $HOSTNAME$ -c $ARG1$ --upload-filesize=$ARG2$ --ignore-proxy
    
  • Create a service for each thing you want to check (system, storage, etc.) and link it to your host(s)
  • Add the credentials of your nextcloud admin user as custom macro (CLOUDUSER, COUDPWD) to your host.

Example 1

./check_nextcloud.py -u adminUser -p secretPassword -H cloud.example.com -c system --ignore-proxy

OK - Nextcloud version: 12.0.3.3

Example 2

./check_nextcloud.py -u adminUser -p secretPassword -H cloud.example.com -c activeUsers --ignore-proxy

OK - Last 5 minutes: 3 user(s), last 1 hour: 10 user(s), last 24 hour: 44 user(s) | users_last_5_minutes=3, users_last_1_hour=10, users_last_24_hours=44

This will return a status message and create a graph based on the performance data.

Example 3

./check_nextcloud.py -u adminUser -p secretPassword -H cloud.example.com -c uploadFilesize --upload-filesize=2.0GiB --ignore-proxy

OK - Upload max filesize: 2.0GiB

# Or, when changed after an update...

CRITICAL - Upload max filesize is set to 512.0MiB, but should be 2.0GiB

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].