Skip to main content

Logs monitoring plugin

Checks an url raise an alert if some problem is found. Uses curl with all its power, so you can extend your check with all curl options.

VERSION

Install

Linux:

sudo pip3 install logs_plugin --upgrade

Also is possible to use:

sudo python3 -m pip install logs_plugin --upgrade

On windows with python3.5:

pip install logs_plugin --upgrade

For proxies add:

--proxy='http://user:passw@server:port'

Usage

Use the command line:

> logs_plugin --help
  usage: logs_plugin [-h] [-fl [Fileocation]] [-wd [Word to Check]] [-e [EXTRA_ARGS]]

    optional arguments:
                        -h, --help            show this help message and exit
                        -fl [Fileocation], --filelocation [Fileocation]
                                                file to check
                        -wd [Word_to_check], --wordtocheck [Word to Check]
                                                word to check
                        -e [EXTRA_ARGS], --extra_args [EXTRA_ARGS]
                                                extra args to add to curl, see curl manpage

Example usage

Example basic usage:

> logs_plugin  --fl '{filelocation}' --wd '{word_to_check}'

Nagios config

Example command:

define command{
    command_name  logs_plugin
    command_line  /usr/local/bin/logs_plugin --fl '$ARG1$' --wd $ARG2$ $ARG3$
}

With proxy defined

# use logs_plugin with proxy

define command {

command_name logs_plugin command_line https_proxy=http://user:pass@PROXYIP:PORT /usr/local/bin/logs_plugin –fl ‘$ARG1$’ –wd $ARG2$ $ARG5$}

Example service:

define service {
        host_name                       SERVERX
        service_description             service_name
        check_command                   logs_plugin!c:\logs\log.txt!wordtocheck
        use                                         generic-service
        notes                           some useful notes
}

With proxy defined:

define service {

host_name SERVERX service_description service_name check_command logs_plugin!c:logslog.txt!wordtocheck use generic-service notes some useful notes}

You can use ansible role that already has the installation and command: https://github.com/CoffeeITWorks/ansible_nagios4_server_plugins

TODO

  • Use hash passwords

  • Add Unit tests?

Metadata

Release files for logs-check-plugin 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for logs-check-plugin 1.4.0
File Size Uploaded Provenance Actions
logs_check_plugin-1.4.0.tar.gz 5.6 kB Without provenance Details for logs_check_plugin-1.4.0.tar.gz

Release files / logs_check_plugin-1.4.0.tar.gz

Download URL logs_check_plugin-1.4.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
de867465305baf4ce9ef1660ea0a055fbb64781018d42615cc2902f7c2fc8ff0
BLAKE2b-256 checksum
How to use checksums
83eb3d9512b10fe3258e4d4eaae911150399b609d9935a0ec0396311b8e87606
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

Security for logs-check-plugin 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page