Create Nagios Plugin

Closed Posted 6 years ago Paid on delivery
Closed Paid on delivery

Have to create a nagios NRPE plugin for a given project.

Your submission will be evaluated anonymously, so refrain from adding your

name or other identifying information to the files you submit.

Introduction

This archive contains a simple credit card processing application. It has

two components: a Ruby web and application server beelzebub (using the

Sinatra framework, and running under Unicorn), and a requester which simulates

making requests against the server. The server receives the requests and writes them to

its data directory. The server also logs each transaction's start time and completion time

via syslog.

Installation

1. Spin up a Debian stable box on a virtual machine

2. Install Ruby on the box

sudo apt-get install ruby2.1 ruby2.1-dev bundler

3. Install beelzebub

tar -xf production_engineer_code_submission.tar.gz

cd production_engineer_code_submission

bundle install

Running

1. Start the application server

cd code_submission

./run

2. Start the requester

cd code_submission

./requester

Challenge

Compose two Nagios NRPE plugins that monitor beelzebub:

1. Create a plugin which can monitor the number of transaction files that the Unicorn

process has open for access. The transaction files are of the

form `code_submission/data/*.yaml`. This plugin should accept `- warning` and `--

critical` thresholds for the number of open transaction files.

check_beelzebub_open_files --warning 10 --critical 20

2. Create a plugin that can monitor the transaction response time for a given time

period. For example, alert if the average transaction response time exceeds two seconds

over the last five minutes. This plugin should accept `--warning` and `--critical`

threshold arguments for the average response time in seconds, and a `- time-period`

argument that specifies the time window to analyze in seconds. Do not modify the

application server or the requester.

check_beelzebub_tx_response_time --time-period 300 --warning 2 --critical 3

Nagios Plugin reference:

<https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/pluginapi.html>

Plugin Python

Project ID: #14012516

About the project

Remote project Active 6 years ago