Sha256: f1b735ee0f2149094ada27522182eeaccdccd3299a62f61ff782e83d53a1d26a
Contents?: true
Size: 892 Bytes
Versions: 1
Compression:
Stored size: 892 Bytes
Contents
#! /usr/bin/env ruby # # check-process # # DESCRIPTION: # This plugin checks whether a User-inputted process is running or not # This checks users tasklist tool to find any process is running or not. # # OUTPUT: # plain text # # PLATFORMS: # Windows # # DEPENDENCIES: # gem: sensu-plugin # # USAGE: # # NOTES: # # LICENSE: # Copyright 2013 <jashishtech@gmail.com> # Released under the same terms as Sensu (the MIT license); see LICENSE # for details. # require 'sensu-plugin/check/cli' # # Check Database # class CheckDatabase < Sensu::Plugin::Check::CLI option :process, short: '-p process' def run # rubocop:disable all temp = system('tasklist|findstr /i ' + config[:process]) puts temp if temp == false message config[:process] + ' is not running' critical else message config[:process] + ' is running' ok end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sensu-plugins-windows-0.0.1.alpha.2 | bin/check-windows-process.rb |