Code Monkey home page Code Monkey logo

nagios-windows-plugins's Introduction

nagios-windows-plugins

Nagios Windows service and host plugins which include performance data for charts and capacity planning

DESCRIPTION

No options exist and the plugin is used for monitoring Windows Servers running RDS. Performance data is output by default. Nagios check plugin used for host monitoring of Remote Desktop Services (RDS) including uptime and CPU usage for Nagios performance charts for total CPU.

No alerts occur based on performance data but instead are based on the Windows RDS service in a "Running" state. Usage is calculated across all cores for total CPU usage.

Nagios Performance data example seen below and has been formatted for readability of the performance metrics.

Example

PS C:\foo> .\check_host.ps1

CRITICAL: Remote Desktop Service is not running - Up for 7 Days 21 Hours 27 Minutes
|'%ProcessorTime'=1.69% 
'%UserTime'=0.78% 
'%PrivilegedTime'=0.20% 
'%InterruptTime'=0.00% 
'%DPCTime'=0.00%

Nagios check plugin used for monitoring CPU usage sampling CPU Average, User Time, Privileged, Interrupt, DPC, CPU Queue, and Max CPU usage during the sample period. Output includes nagios performance data for charting and alerts

DESCRIPTION

CPU usage is calculated using a number of intervals and sleep period between intervals to get the desired flexibility for calculating total CPU usage. Most nagios performance checks lack the ability to be more true to CPU usage because a single sample at one moment in time is insufficient information. By default the plugin was designed with speed in mind so that the nagios plugin would not take too long to retrun a result, this can in turn allow you to increase the freshness requirement in the nagios configuration for a fine tuned time vs. freshness mix creating accurate and reactive nagiog alerts.

This Nagios Plugin takes 60 (default) samples of the CPU metrics and sleeps 0.7 seconds (default) between each sample to calculate an average CPU usage, over a configurable amount of time.

Performance data is output by default. Thresholds have default 'nominal' values and requires no command line arguments to run the check.

Alerts occur based on performance data for Privileges and Total Processor Time Includes charting the Maximum CPU samples observed over the collection of samples to further enhance and provide detail to CPU utilization.

Usage is calculated across all cores for total CPU usage. Adjust the variables as needed for changing the sampling method or thresholds from the default via command line

	-delay 		(default 0.7) Sleep time between reps
	-reps 		(default 60) Number of samples to take
	-privwarn 	(default 50) Privileged CPU warning threshold
	-privcrit 	(default 75) Privileged CPU critical threshold
	-cpuwarn 	(default 80.3) CPU Average warning threshold
	-cpucrit 	(default 95) CPU Average critical threshold

Nagios Performance data example seen below and has been formatted for readability of the performance metrics.

EXAMPLE

PS C:\foo> .\check_win_cpu.ps1 -delay 1 -reps 5 -privwarn 50 -privcrit 75 -cpuwarn 80.3 -cpucrit 95

OK: CPU - 5 sample average: 1.20% (Max:2% - Max Queue:0)|
'Max_CPU'=2%;;;0;100
'CPU_Average'=1.20%;80.3;95;0;100
'User_Time'=0.20%;;;0;100
'Privileged'=0.00%;50;75;0;100
'Interrupt'=0.00%;50;70;0;100
'DPC_Time'=0.00%;50;75;0;100
'Max_Queue'=0;18;32;0;50

Description

Nagios check plugin used for monitoring user counts and group them by activity of active (5min or less), 15min, 30min, 45min and 45+min idle users.

  • Output includes Nagios performance data for charting.
  • Performance data is output by default.
  • No alerts occur with the plugin at this time.

It is used for performance charting and informational only. Perfect for layering in Nagios XI Graph Explorer

Grouping of users by their idle status from Windows RDS (Remote Desktop Server) which has a maximum inactivity value of 1 minute before being considered idle:

  • Working Users(Active) = Less than 4 min idle or in active status reported by RDS
  • 15min = 5-15min idle
  • 30min = 16-30min idle
  • 45min = 31-45min idle
  • 45plus = more than 46min idle

Requires

Remote Desktop Services to count the active users and group them by idle time.

Outputs HTML so you must enable that Nagios option

Nagios XI

Admin -> System Settings and check the "Allow HTML Tags in Host/Service Status"

Nagios

Set escape_html_tags=0 in your cgi.cfg

Example

PS C:\foo> .\check_user_session_activity.ps1

Active Users 15min or under: 92 (37 Working)
<br />============================
<br />15min-30min Idle: 5
<br />30min-45min Idle: 3
<br />============================
<br />45min Plus Idle: 10|
'Under15min_Idle'=0;100;;;
'Working_Users'=0;;;;
'15_30min_Idle'=0;100;;;
'30_45min_Idle'=0;100;;;
'45min_Plus_Idle'=0;100;;;

Checks for a running process, if not running it will retun as a WARNING alert for Nagios

Description

Specify the process using regular expressions knowing it uses where 'like' matching using the commandline switch. Even though the return code to Nagios will result as a WARNING, the text output of the plugin indicates critical for cohersion of the operators to take action.

Use regular expressions for the -process command line option.

PS C:> .\check_process.ps1 -process '*notepad*'

OK: Process Running contining *notepad* in the commandline

PS C:> .\check_process.ps1 -process '*notepad'

CRITICAL: Process containing (*notepad) in the commandline is not running

nagios-windows-plugins's People

Contributors

hirechrisjohnston avatar

Stargazers

 avatar

nagios-windows-plugins's Issues

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.