GithubHelp home page GithubHelp logo

mipmhannes / zabbix_lsi_template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mykolq/zabbix_lsi_template

0.0 0.0 0.0 48.32 MB

Template is for discovering and monitoring LSI (Avago, Broadcom) storage controllers

Python 100.00%

zabbix_lsi_template's Introduction

zabbix_lsi_template

Description

This template is for discovering and monitoring LSI based (Avago, Broadcom, Perc, Lenovo) storage controllers by using json outputs of storcli64 and perccli64 tool. Now it works only with zabbix 5.2 and higher

Main features

  • Discovery of controllers, logical discs, physical discs, batteries (bbu and cv) without scripts on agent side (it uses parsing of json and javascript preprocessing on zabbix server side)
  • Monitoring controllers, logical, physical discs, batteries
  • Useful with OS, where storcli64 and perccli64 works
  • Overrides for reducing non supported items
  • Comfortable changing of time intervals by macroses.

Plans

  • In some cases we can get all data (without detailed information about batteries) in one command (/call show all j)

Installation

Zabbix server

  • Import template
  • Create and configure global or template macroses:
    • {$ADAP_DISCOVERY_PERIOD} - adapters discovery period. I think you can set it nearly 1d (daily)
    • {$ADAP_HISTORY_PERIOD} - period of saving history for adapters data. For example 30d
    • {$ADAP_REQUEST_PERIOD} - period of requesting storage adapters data ( adapter,battery state, etc). 1h
    • {$LD_DISCOVERY_PERIOD} - logical discs discovery period. 6h
    • {$LD_HISTORY_PERIOD} - period of saving history for logical discs data. 30d
    • {$LD_REQUEST_PERIOD} - period of requesting logical discs data. 5m
    • {$PD_DISCOVERY_PERIOD} - physical discs discovery period. 30m
    • {$PD_HISTORY_PERIOD} - period of saving history for physical discs data. 30d
    • {$PD_REQUEST_PERIOD} - period of requesting physical discs data. 5m
    • {$ADAP_THROTTLING_HB_PERIOD} - period of heartbit for throttling for adapter data
    • {$LD_THROTTLING_HB_PERIOD} - period of heartbit for throttling for logical discs data
    • {$PD_THROTTLING_HB_PERIOD} - period of heartbit for throttling for physical discs data.
  • Connect template to agent, configure {$LSI_CLI} = 'perccl64' host macro if this host has Perc controller. All other controllers use storcli64 and it is default option. {$LSI_PD_COMMAND} has default option '/call/eall/sall' and can be counted by template *For automating changes of {$LSI_PD_COMMAND} you have to do instructions below:
    • Create user for API. This user must have write access for changing settings of servers, monitoring by this template.
    • Install pyzabbix module for you default python version (Something like pip install pyzabbix)
    • Copy updatehostmacro.py script to your zabbix external script folder
    • Than you have to create macroses (i use global) for login and password of this user. Create macros for zabbix server URL. For example: {$ZBX_API_WRITER_USER}, {$ZBX_API_WRITER_PASSWORD}, {$ZBX_URL}. Zabbix url macros must equal something like that: http://zabbix_server_address/zabbix
    • Create script 'Update hostmacro' (Administration-Scripts) with command (check your file path) /usr/bin/python3 /zabbixexternalscripts/updatehostmacro.py "--zbxurl" "{$ZBX_URL}" "--zbxuser" "{$ZBX_API_WRITER_USER}" "--zbxpass" '{$ZBX_API_WRITER_PASSWORD}' "--host" "{HOST.HOST}" "--macroname" "{EVENT.TAGS.MACRONAME}" "--macrovalue" '{EVENT.TAGS.MACROVALUE}' "--valuetype" "{EVENT.TAGS.VALUETYPE}"
    • Create action with name like "Change macro value on host" and condition "Value of tag ACTION equals Change macro value on host"
    • Add step for execution 'Update hostmacro' script

Windows

  • Copy storcli64, perccli64 utility (you can use version in diskutils_windows.zip) in place where you store things like this
  • Copy lsi_raid_win.conf in zabbix_agent configs folder
  • Edit storcli paths in lsi_raid_win.conf.

Linux (tested with Centos 7 with disabled SELinux, Ubuntu 20.04)

  • Copy storcli64, perccli64 utility (you can use version in diskutils_windows.zip) in place where you store things like this
  • Copy lsi_raid_linux.conf in zabbix_agent configs folder (by default /etc/zabbix/zabbix_agentd.d/)
  • Check and edit storcli paths in lsi_raid_linux.conf
  • Copy sudoers_zabbix file to /etc/sudoers.d. Check path for storcli64, perccli64.

Later today or tomorrow i will add default macro values in template

zabbix_lsi_template's People

Contributors

mykolq avatar valnuro 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.