Giter Club home page Giter Club logo

glusix's Introduction

glusix

Zabbix Agent - Gluster

Dependencies

Packages

  • ksh
  • bc
  • awk

Debian/Ubuntu

~# sudo apt install ksh bc awk
~#

Red Hat

~# sudo yum install ksh bc awk
~#

Deploy

The deploy script is not intended to advise which approach you should implemented nor deploy the sudoers configuration but the user that will run the script needs be running with sudo privileges.

There are two options to setting up sudoers for the user:

  1. Provided sudo all
~# cat /etc/sudoers.d/user_zabbix
Defaults:zabbix !syslog
Defaults:zabbix !requiretty

zabbix	ALL=(ALL)  NOPASSWD:ALL
~#
  1. Limited acccess to run command with sudo
~# cat /etc/sudoers.d/user_zabbix
Defaults:zabbix !syslog
Defaults:zabbix !requiretty

zabbix ALL=(ALL) NOPASSWD: /usr/sbin/glusterd *
zabbix ALL=(ALL) NOPASSWD: /usr/bin/gluster *
~#

Zabbix

Please ensure that the zabbix user has the right permissions before continue with the installation.

~# git clone https://github.com/sergiotocalini/glusix.git
~# sudo ./glusix/deploy_zabbix.sh
~# sudo systemctl restart zabbix-agent

Note: the installation has to be executed on the zabbix agent host and you have to import the template on the zabbix web.

glusix's People

Contributors

sergiotocalini avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

glusix's Issues

zabbix agent user sudo

zabbix agent user needs sudo privs on gluster and glusterd commands

other than that, awesome work, thanks for providing this !!

I guess I add that requirement to the README.

volume_status.sh display_units not working on fedora 30

Everything worked, except "Disk total" and "Disk free", which both showed 0.

After debugging I came up with a patch that fixed it for me.

Fedora 30
ksh: ksh-2020.0.0-0.2.fc30.x86_64

--- /root/glusix/glusix/scripts/volume_status.sh	2019-08-15 12:25:35.665640740 +0000
+++ /etc/zabbix/scripts/agentd/glusix/scripts/volume_status.sh	2019-08-15 13:30:37.297833044 +0000
@@ -18,11 +18,11 @@
         res="${from_val}"
     else
         if [[ ${from_units} == 'TB' && ${to_units} == 'B' ]]; then
-            ec="${from_val} * (${divide} ^ 4)"
+            ec="$((${from_val} * (${divide} ** 4)))"
         elif [[ ${from_units} == 'GB' && ${to_units} == 'B' ]]; then
-            ec="${from_val} * (${divide} ^ 3)"
+            ec="$((${from_val} * (${divide} ** 3)))"
         elif [[ ${from_units} == 'MB' && ${to_units} == 'B' ]]; then
-            ec="${from_val} * (${divide} ^ 2)"
+            ec="$((${from_val} * (${divide} ** 2)))"

glusix[volume_status, prod-glusterfs, size, free] incorrectly reports the size of the arbiter node

ref: https://docs.gluster.org/en/latest/Administrator%20Guide/arbiter-volumes-and-quorum/

I have a glusterfs configuration of two data notes and a arbiter node (replica 3 arbiter 1). The arbiter node has a small disk. Now glusix[volume_status, prod-glusterfs, size, free] incorrectly assumes the arbiter node is the smallest node of the replica, and glusix[volume_status, prod-glusterfs, size, free] reported the free size of the arbiter node.

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.