Giter VIP home page Giter VIP logo

rabe-zabbix's Introduction

rabe-zabbix

Collection of various Zabbix templates and helper scripts created or used by Radio Bern RaBe.

See below for an overview of our templates. We group our templates similar to how Zabbix-out-of-the-box templates are grouped.

Stacks

Every host within Zabbix gets a specific stack template assigned according to its role. The stack exactly defines the setup of this host and will be re-used if there is more than one host with the same role.

As an example, a host which servers a MediaWiki instance, will get the stack template MediaWiki Stack assigned. The stack template might include the operating system template EL9 Stack, the application templates Apache by HTTP, PHP-FPM by HTTP and MariaDB by agent 2.

This ensures great modularity, reusability and avoids unecessary inheritance problems.

Stacks: Applications

Name 3.0 6.4 7.0
Apache with TLS by HTTP Stack
Nginx with TLS by HTTP Stack
Songticker Stack
systemd Stack

Stacks: Network devices

Name 3.0 6.4 7.0
Netgear GS108Tv2 SNMPv2
Netgear M5300 Series SNMPv2

Stacks: Operating systems

Name 3.0 6.4 7.0
EL7 Stack
EL8 Stack
EL9 Stack

Stacks: Servers

Name 3.0 6.4 7.0
EL7 KVM VM Stack
EL8 KVM VM Stack
EL9 KVM VM Stack

Templates

Templates: Applications

Name 3.0 6.4 7.0
Alarm Pinger
Apache HTTP Server
auditd
Axia ALSA Soundcard Driver for Livewire
BSNMP
candlepin-rhsmcertd
CARP
certmonger
chrony
Cronie
Darkice
dpinger
firewalld
GlusterFS Client
GlusterFS Server
gssproxy
Icecast
ISC DHCP daemon
ISC DHCP Relay Agent
JACK Audio Connection Kit sound server
Journalbeat
libvirtd
lighttpd
LVM
MD-RAID
ntpd
qemu-ga
Rotter
rpc.gssd
rsyslog
Songticker
sssd
systemd-journald
systemd-logind
systemd-udevd
timedatectl
tuned
zabbix-agent
Zabbix unsupported items

Templates: Network devices

Name 3.0 6.4 7.0
SNMPv2 AVT AE1 DABPlus Go
SNMPv2 Generic
SNMPv2 Interfaces HC
SNMPv2 Livewire
SNMPv2 Netgear Box Services
SNMPv2 Netgear Inventory
SNMPv2 Netgear SNTP client
SNMPv2 Netgear Switching
SNMPv2 UBNT-UniFi-MIB
SNMPv2 UCD-SNMP-MIB load average
SNMPv2 UCD-SNMP-MIB memory

Templates: Operating systems

Name 3.0 6.4 7.0
FreeBSD
Linux

Templates: Server hardware

Name 3.0 6.4 7.0
Drive Slot Sensors
Module Board Generic Sensors
Power Supply Generic Sensors
Power Supply Sensors
Sensor Discovery
Supermicro SSG-6048R-E1CR24N
Supermicro X7DWU
Threshold Sensors

Overrides

In some cases we override the Zabbix out-of-the-box templates to ensure they fit our use case. We publish the changed templates along with a generated diff against its upstream version.

Name 6.4 7.0
Apache by HTTP
Nginx by HTTP

Zabbix Version Support

We primarily support versions of Zabbix we use in production.

Version Supported Description
3.0 legacy RaBe environment
6.4 for LTS preparation work until 7.0 is available
7.0 once released

OS Version Support

Our Zabbix 3.0 template mainly template EL7 installations based on CentOS 7. The 6.4+ templates aim to support both EL7 as well as EL9, with EL7 on a best effort case (e.g. we don't workaround the lack of timedatectl show on old distros, their timedatectl stays unmonitored).

Contributing

See CONTRIBUTING.md if you want to contribute fixes or templates.

Previous Versions

If you are looking for the documentation and tooling of the Zabbix 3.0 only version of this repo, you may find them in 5d2dfb7.

License

This template collection is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.

The contents of the Overrides/ folder are released under the GNU General Public License (GPL) version 2. You can redistribute it and/or modify it under the terms of the GNU GPL as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Copyright

Copyright (c) 2017 - 2024 Radio Bern RaBe

rabe-zabbix's People

Contributors

chrono-meter avatar cweiland avatar dependabot[bot] avatar hairmare avatar ka2er avatar paraenggu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rabe-zabbix's Issues

app/LVM is working fine in Zabbix 4.0 LTS

I don't know if you get that much feedback, I just wanted to point out that the LVM template works like it should in Zabbix 4.0 (on the zabbix-share site of the project it mentioned Zabbix 3.0.x)

Cheers!

  • tschaerni

ipmi-sensor-discovery.sh: 47: set: Illegal option -o pipefail

Hallo,
discovered your work on share.zabbix.com.
I downloaded the script and tried to run if from shell, but it fails immediately. Any idea why this happens?
Thank you!

EDIT: I'm on Debian 9 Stretch amd64 with Zabbix 3.4.x
If I comment out line 47 the script seems to work.

UserParameter=custom.md.discovery do not parse raid0

So I have ubuntu 20.04 with raid0


 mdadm -D /dev/md0
/dev/md0:
           Version : 1.2
     Creation Time : Mon Sep 28 21:34:49 2020
        Raid Level : raid0
        Array Size : 7813520384 (7451.55 GiB 8001.04 GB)
      Raid Devices : 4
     Total Devices : 4
       Persistence : Superblock is persistent

       Update Time : Mon Sep 28 21:34:49 2020
             State : clean 
    Active Devices : 4
   Working Devices : 4
    Failed Devices : 0
     Spare Devices : 0

            Layout : original
        Chunk Size : 512K

Consistency Policy : none

              Name : ubuntu-server:0
              UUID : b14fa1a1:96da7eba:8fd8a81c:36258895
            Events : 0

    Number   Major   Minor   RaidDevice State
       0       8       34        0      active sync   /dev/sdc2
       1       8       17        1      active sync   /dev/sdb1
       2       8        1        2      active sync   /dev/sda1
       3       8       49        3      active sync   /dev/sdd1

I copied your userparameter_md.conf file into /etc/zabbix/zabbix_agentd.d folder . For the servers that have configured raid1 - this parameter works well:
UserParameter=custom.md.discovery,cat /proc/mdstat | grep -B 1 -E "(U+|_+)" | awk 'BEGIN { printf "{\"data\":["}; /^md/ { printf c"{\"{#MDNAME}\":\""$1"\"}";c=","}; END{ print "]}" }'

But I have raid0 and this grep cat /proc/mdstat | grep -B 1 -E "(U+|_+)" not parsed it. It returned NULL, because it parse UU that is not used for raid0.
And if you try to use this user parameter:
UserParameter=custom.md.discovery,cat /proc/mdstat | awk 'BEGIN { printf "{\"data\":["}; /^md/ { printf c"{\"{#MDNAME}\":\""$1"\"}";c=","}; END{ print "]}" }' - zabbix will parse raid0 devices.

Doesn't work under Zabbix 4.0

I have installed this template under zabbix 4.0 and tested it with a Ubuntu 16.04 client (zabbix-agent) using mdadm raid 10. After installing the client config and resetting the zabbix agent on the client there are no errors in the agent log but I don't see any data relating to mdadm when I check out the "Latest data" page for the mdadm using zabbix client.

zabbix-agent can't sudo with selinux-policy-3.13.1-229.el7_6.6

Some new policy seems to have been enforced and sudo (in UserParameters) for things like some app/lvm template are getting denied.

The new(?) SELinux bools don't seem to work. I tried:

setsebool zabbix_run_sudo=1
setsebool domain_kernel_load_modules=1

The current workaround is to semanage permissive -a zabbix_agent_t until we can fix our rabezbxzabbixagent SELinux module to let the zabbix user use sudo to run things like lvs.

On some investigation I found that this might be specific and due to how our pam stack is configured as the servers are configured as part of a freeipa domain.

I'm preparing a pr to address this and it should be ready after some more testing.

LVM unavailable options

Hello! I'm trying to use the LVM app. It looks well thought out and well documented. I got most of it working, like discovery. Many items work fine as well, but some don't.

When I looked into it, it seems my 'lvs' does not support some -o options, specifically: data_user, metadata_free, metadata_free_percent, data_free_percent, data_free. There may be more, but these are the ones I'd like to use.

They also don't show up in lvs -o help. I'm using lvm2 version 2.03 on Ubuntu. I also looked on a Centos server, but it looks like the options aren't there as well.

Are you using a different lvs tool? Do you have any idea how to make this working?

Thanks!

Import fails with Zabbix 5.2

Cannot read XML: (41) Specification mandates value for attribute data-pjax-transient [Line: 68 | Column: 89].

Regarding Debian

I saw that the package is available for CentOS. Do you think it would work on Debian as well? We could really use that, but our system is on Debian.

Value should be a JSON object

When using your script in Zabbix 3.4 it gets the following error: Value should be a JSON object." I don't think the output of your script produces a properly JSON formatted output anymore with the changes in LLD rules now in Zabbix 3.4. This seems to be an issue now with all your scripts, not just this one.

Could you check?

value should be a json object

Update MD-RAID template README with instructions on using it in passive mode

I have successfully got your MD-RAID template to work under Zabbix 4.0 but I had to change a few settings to use passive instead of active monitoring. I think the MD-RAID README should be updated with instructions on how to do this because its not at all obvious (to Zabbix newbs) and it took me a while to work it out / remember how to do it.

There may be a better way to do it but I used these steps (after following the existing installation instructions):

Under the Zabbix web interface go to Configuration -> Hosts -> then click 'Discovery' next to the relevant host. Now click 'Item prototypes' next to the 'RAID device (MD) discovery' rule then click on each of the 5 item prototypes and change the Type of all 5 Raid device item prototypes from 'Zabbix agent (active)' to 'Zabbix agent'.

Faulty drive/degraded state doesn't trigger anything

Hello,

I setup this wonderful plugin successfully. However, there is not alerts triggered even if I manually set a disk to faulty state.

My Zabbix Agent is used in passive mode so I just changed "Zabbix Agent (active)" to "Zabbix Agent" in discovery templates settings.

Here's the output of few debug commands :

su -c 'zabbix_agentd -t rabe.raid.md.raid-device.discovery' -s /bin/bash zabbix
rabe.raid.md.raid-device.discovery [t|{"data":[{"{#MD_RAID_RAID_DEV_NAME}":"md0"}]}]

mdadm -D /dev/md0

/dev/md0:
           Version : 1.2
     Creation Time : Fri Mar 27 19:42:13 2020
        Raid Level : raid5
        Array Size : 3906762752 (3725.78 GiB 4000.53 GB)
     Used Dev Size : 1953381376 (1862.89 GiB 2000.26 GB)
      Raid Devices : 3
     Total Devices : 3
       Persistence : Superblock is persistent

     Intent Bitmap : Internal

       Update Time : Sun Mar 29 13:25:00 2020
             State : clean, degraded 
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 1
     Spare Devices : 0

            Layout : left-symmetric
        Chunk Size : 512K

Consistency Policy : unknown

              Name : scarif:0  (local to host scarif)
              UUID : a54c09d4:af8606cc:97bc4ab1:5d7c5f77
            Events : 23977

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       -       0        0        1      removed
       3       8       33        2      active sync   /dev/satac1

       1       8       17        -      faulty   /dev/satab1

My host's items discovered screenshot
https://i.ibb.co/FVcQpMM/Capture-d-cran-de-2020-03-29-17-04-49.png

My host's triggers for MD RAID active
https://i.ibb.co/g9qs4rj/Capture-d-cran-de-2020-03-29-17-08-21.png

Am I doing anything wrong ?

Thank you :)

ipmitool dcmi power reading

I couldnt find template for the power reading. For example ipmitool can be used as follows:

# ipmitool dcmi power reading

    Instantaneous power reading:                   197 Watts
    Minimum during sampling period:                175 Watts
    Maximum during sampling period:                242 Watts
    Average power reading over sample period:      190 Watts
    IPMI timestamp:                           Sun Mar  6 15:13:42 2022
    Sampling period:                          00123893 Seconds.
    Power reading state is:                   activated

Is there a way to get this information from your templates?

template import

Template_App_MD-RAID_active.xml
Cannot read XML: (41) Specification mandate value for attribute data-pjax-transient [Line: 43 | Column: 91].

Zabbix 3.4

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.