Giter VIP home page Giter VIP logo

rc48807 / check_apache404 Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 13 KB

This Nagios plugin monitors the Apache server log file in search of State 404, receiving as arguments the full path of the log file, and the maximum values for warning and critical, these values are passed in pairs (50.100), to specify the value of records per IP address and the total respectively. By default the plugin audits all contents of the file, and can be parameterized the number of rows to be read using -n argument. Nagios signals with the warning or critical states, depending on the amount of records detected.

License: GNU General Public License v2.0

Python 100.00%

check_apache404's Introduction

check_apache404

Apache is one of the most popular open-source HTTP server, whose main function is to process among other requests the hyper-Text Transfer Protocol (HTTP). When responding, Apache associates each response a predefined state. These states specify the type of response to the request, and because they are relevant events, are logged in a log file. The 404 state is one of several states of this software, which in addition to indicating the inability of the server to meet the request for unavailability of content, may also indicate attempted access to unauthorized content, which may be evidence of an event susceptible to compromise the security.

This Nagios plugin monitors the Apache server log file in search of State 404, receiving as arguments the full path of the log file, and the maximum values for warning and critical, these values are passed in pairs (50.100), to specify the value of records per IP address and the total respectively. By default the plugin audits all contents of the file, and can be parameterized the number of rows to be read using -n argument. Nagios signals with the warning or critical states, depending on the amount of records detected.

Mandatory arguments: The following arguments must be specified whenever the module is executed:

-p or --path used to specify the path of the Apache log file.

-c or --critical used to specify the values from which to be considered critical situation, this argument receives two values, one for the general case, i.e. total number of errors encountered, and the other for the number of errors per IP address.

-w or --warning used to specify the values from which the script should consider the result as warning, the resemblance of the -c this argument is also twofold.

Optional arguments: The following arguments are optionally invoked, as required by the user:

-n or --number used to specify the number of rows to read in the log file.

-V or --version used to query the module version.

-A or --author used to query the author's data.

Command-Line Execution example:

./check_apache404.py -p /var/log/apache2/access.log -c 300,200 -w 200,150 -n 1000

check_apache404's People

Contributors

rc48807 avatar

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.