Code Monkey home page Code Monkey logo

check_mk_zvolsize's Introduction

check_mk zvolsize plugin

plugin to check/collect zvol (zfs volume) sizes with volsize, used size, snapshot sizes and comp.ratio usecase: monitor used diskspace (including snapshots) for sparse zvols when overcommitting diskspace for VMs.

Links:

Example output (without Headline) from agent plugin:

zfs list -p -t volume -r -o name,volsize,used,available,usedbydataset,usedbysnapshots,compressratio
NAME             VOLSIZE         USED        AVAIL       USEDDS    USEDSNAP  RATIO
zserv/vm1    16106127360  13741113344  66381434880  11687993344  2053120000  1.27x
zserv/vm3    16106127360  14498553856  66381434880  12562055168  1936498688  1.18x
zserv/vm5    26843545600   6466097152  66381434880   5196242944  1269854208  1.26x
...

Install

OMD Server Install

check_mk package:

cmk -vP install releases/zvolsize-<VERSION>.mkp

manually:

cp checks/zvolsize /omd/sites/$(OMD_SITE)/local/share/check_mk/checks/
cp plugins/zvolsize /omd/sites/$(OMD_SITE)/local/share/check_mk/agents/plugins/
cp templates/check_mk-zvolsize.php /omd/sites/$(OMD_SITE)/local/share/check_mk/pnp-templates/
cp packages/zvolsize /omd/sites/$(OMD_SITE)/var/check_mk/packages/

use make target:

usage: make [target ...]

pkg:
  pkg......................alias for package
  package..................build check_mk package from installed repo files
  release..................build check_mk package and copy *.mkp file to repo

dev:
  install..................install check_mk plugin, optional OMD_SITE3=hrzg can be overwritten
  purge....................purge check_mk plugin files, optional OMD_SITE3=hrzg can be overwritten

system:
  help.....................show this help

Client Install

cp plugins/zvolsize /usr/lib/check_mk_agent/plugins/zvolsize

Or download plugin from OMD Server, or rollout plugin with puppet ;-)

check_mk package cheatsheet

pack check_mk package (see make target above)

#create package meta file (only required if repo dosn't include it yet or the first time)
cmk -vP 
# bundle package file
cmk -vP pack zvolsize

Other Options for package handling see:

cmk -vP
Usage: check_mk [-v] -P|--package COMMAND [ARGS]

Available commands are:
   create NAME      ...  Collect unpackaged files into new package NAME
   pack NAME        ...  Create package file from installed package
   release NAME     ...  Drop installed package NAME, release packaged files
   find             ...  Find and display unpackaged files
   list             ...  List all installed packages
   list NAME        ...  List files of installed package
   list PACK.mkp    ...  List files of uninstalled package file
   show NAME        ...  Show information about installed package
   show PACK.mkp    ...  Show information about uninstalled package file
   install PACK.mkp ...  Install or update package from file PACK.mkp
   remove NAME      ...  Uninstall package NAME

   -v  enables verbose output

Package files are located in /omd/sites/$(OMD_SITE)/var/check_mk/packages/.

check_mk_zvolsize's People

Contributors

handcode avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

check_mk_zvolsize's Issues

Check_MK 2.0 - plugin failure "inconsistent use of tabs and spaces in indentation"

After migrating from Check_MK 1.6 to 2.0 the plugin check_mk_zvolsize does not function any more.
Check_MK displays ans error message "inconsistent use of tabs and spaces in indentation" in the migration protocol and check results disappear from monitoring.

After some searching I resolved this issue by issuing the vim command ":retab" for
/omd/sites/mysite/local/share/check_mk/checks/zvolsize
to convert the tabs to spaces.

https://stackoverflow.com/questions/426963/replace-tabs-with-spaces-in-vim

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.