Additional scripts for Zabbix agent on Linux to discover and monitor several services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

326 lines
12 KiB

%if 0%{?rhel} && 0%{?rhel} < 7
%global _without_selinux 1
%endif
12 years ago
Summary: Scripts for Zabbix monitoring
Name: zabbix-agent-addons
Version: 0.2.36
Release: 1%{?dist}
12 years ago
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
License: GPL
Group: Virtualization
BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{_prefix}
Requires: zabbix-agent
Requires: perl(Getopt::Long)
Requires: perl(Getopt::Std)
Requires: perl(JSON)
Requires: perl(Linux::LVM)
Requires: perl(POSIX)
12 years ago
Requires: perl(MIME::Base64)
11 years ago
Requires: perl(File::Which)
10 years ago
Requires: perl(Config::Simple)
%if ! 0%{?_without_selinux}
Requires: policycoreutils
BuildRequires: selinux-policy-devel
BuildRequires: checkpolicy
%endif
AutoReqProv: no
12 years ago
%description
This package contains some usefull script to monitor
a Linux box with Zabbix. It provides helper scripts to
discover and monitor things like filesystems, block devices
LVM, RAID status, S.M.A.R.T. drives, BackupPC etc...
%prep
%setup -q
%build
%if ! 0%{?_without_selinux}
pushd selinux
make -f %{_datadir}/selinux/devel/Makefile
popd
%endif
12 years ago
%install
%{__rm} -rf $RPM_BUILD_ROOT
# Install zabbix scripts
%{__install} -d -m 750 $RPM_BUILD_ROOT%{_localstatedir}/lib/zabbix/bin
12 years ago
%{__install} -m 0755 zabbix_scripts/* $RPM_BUILD_ROOT%{_localstatedir}/lib/zabbix/bin
# Install Zabbix conf
%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_agentd.conf.d/
%{__install} -m 0644 zabbix_conf/* $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_agentd.conf.d/
9 years ago
# Install perl modules
%{__install} -d -m 0755 $RPM_BUILD_ROOT%{perl_vendorlib}
cp -r lib/* $RPM_BUILD_ROOT%{perl_vendorlib}/
# Install sensors conf
10 years ago
%{__install} -m 0755 conf/sensors.ini $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/
12 years ago
# Install sudo conf
%{__install} -d 750 $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d
%{__install} -m 600 conf/sudo.conf $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d/zabbix_agent
# Install SELinux policy
%if ! 0%{?_without_selinux}
%{__install} -d 750 $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}
%{__install} -m644 selinux/%{name}.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/%{name}.pp
%endif
12 years ago
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%pre
10 years ago
12 years ago
%preun
%post
10 years ago
if [ $1 -eq 2 ] ; then
if [ -e "/etc/zabbix/sensors.conf" ]; then
10 years ago
/var/lib/zabbix/bin/util_convert_sensors_ini /etc/zabbix/sensors.conf
fi
fi
12 years ago
%files
%defattr(-,root,root,-)
%doc README
%dir %attr(0750,zabbix,zabbix) %{_localstatedir}/lib/zabbix/bin
%{_localstatedir}/lib/zabbix/bin/*
9 years ago
%{perl_vendorlib}
10 years ago
%config(noreplace) %attr(0640,root,zabbix) %{_sysconfdir}/zabbix/sensors.ini
%config(noreplace) %attr(0640,root,zabbix) %{_sysconfdir}/zabbix/zabbix_agentd.conf.d/*
%attr(0440,root,root) %{_sysconfdir}/sudoers.d/*
%if ! 0%{?_without_selinux}
%{_datadir}/selinux/packages/%{name}/%{name}.pp
%endif
12 years ago
%changelog
* Tue Jun 05 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.36-1
- Remove redundant condition (daniel@firewall-services.com)
- Fix {#PVE_STOR_STATUS} macro (daniel@firewall-services.com)
- Only gather info about online nodes (daniel@firewall-services.com)
- Add some global cluster stats for PVE (daniel@firewall-services.com)
* Sun Jun 03 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.35-1
- Enhance PVE scripts and conf (daniel@firewall-services.com)
- Add basic scripts for PVE monitoring (daniel@firewall-services.com)
* Wed May 30 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.34-1
- Add stats for ZFS zpools (daniel@firewall-services.com)
* Tue May 29 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.33-1
- Ensure we always return a value for scan action status errors in check_zfs
(daniel@firewall-services.com)
* Tue May 29 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.32-1
- Handle situations where there's more than 1000 errors on a item in ZFS pools
(daniel@firewall-services.com)
* Tue May 29 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.31-1
- Various enhancements in check_zfs (daniel@firewall-services.com)
- Fix macro name for zfs zpool discovery (daniel@firewall-services.com)
* Mon May 28 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.30-1
- Rename vfs.zfs.discovery to vfs.zfs.zpool.discovery So later we'll be able to
add other discovery rules for say, datasets (daniel@firewall-services.com)
* Mon May 28 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.29-1
- Add scripts to discover and check ZFS zpools (daniel@firewall-services.com)
* Tue Mar 06 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.28-1
- Use "all" key to get all httpd stats in JSON format (daniel@firewall-
services.com)
* Tue Mar 06 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.27-1
- Respond with all stats as a JSON structure if no --what given
(daniel@firewall-services.com)
* Tue Mar 06 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.26-1
- Support space in httpd status key So total_accesses and total_kbytes are
available again (daniel@firewall-services.com)
* Tue Feb 06 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.25-1
- Fix mdadm RAID discovery condition (daniel@firewall-services.com)
* Tue Jan 09 2018 Daniel Berteaud <daniel@firewall-services.com> 0.2.24-1
- Don't WARN when device is being checked, only when it's rebuilding
(daniel@firewall-services.com)
- Don't detect mdadm RAID in containers (daniel@firewall-services.com)
* Thu Nov 30 2017 Daniel Berteaud <daniel@firewall-services.com> 0.2.23-1
- Check line format in check_httpd Instead of spliting errors in case server-
status redirect to somewhere else (daniel@firewall-services.com)
* Mon Nov 20 2017 Daniel Berteaud <daniel@firewall-services.com> 0.2.22-1
- Add script to monitor spamassassin's bayes database stats (daniel@firewall-
services.com)
- Symlink releasrs.conf to global's one (daniel@firewall-services.com)
* Tue Nov 14 2017 Daniel Berteaud <daniel@firewall-services.com> 0.2.21-1
- Remove now non existing CHANGELOG.git file (daniel@firewall-services.com)
* Tue Nov 14 2017 Daniel Berteaud <daniel@firewall-services.com> 0.2.20-1
- new package built with tito
7 years ago
* Thu Oct 12 2017 Daniel Berteaud <daniel@firewall-services.com> - 0.2.19-1
- Correctly handle Partially Degraded state
* Thu Aug 24 2017 Daniel Berteaud <daniel@firewall-services.com> - 0.2.18-1
- Only include SELinux policy module on el7
* Wed Aug 23 2017 Daniel Berteaud <daniel@firewall-services.com> - 0.2.17-1
- Add a SELinux policy module
8 years ago
* Wed Jun 14 2017 Daniel Berteaud <daniel@firewall-services.com> - 0.2.16-1
- Add kernel.openedfile UserParameter
8 years ago
* Thu Nov 24 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.15-1
- Fix discovery scripts to always return a valid JSON value, even if empty
(sensors, lvm and nut_ups)
8 years ago
* Wed Nov 9 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.14-1
- Add scripts to monitor apache httpd
8 years ago
* Sun Oct 30 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.13-1
- Fix handling Airflow_Temperature_Cel label
8 years ago
* Fri Oct 28 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.12-1
- Support Airflow_Temperature_Cel as temp label for smartctl based sensors
8 years ago
* Thu Sep 1 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.11-1
- Add support for lm_sensors based sensors
8 years ago
* Thu Aug 25 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.10-1
- Add monitoring item for squid's FD
9 years ago
* Wed Apr 6 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.9-1
- Detect HDD temp sensors on sat+megaraid controllers
9 years ago
* Mon Mar 21 2016 Daniel B. <daniel@firewall-services.com> - 0.2.8-1
- Prevent running several gluster check commands at the same time
9 years ago
* Wed Sep 16 2015 Daniel B. <daniel@firewall-services.com> - 0.2.7-1
- Prevent GlusterFS heal false positive due to concurrent locking
9 years ago
* Mon Sep 14 2015 Daniel B. <daniel@firewall-services.com> - 0.2.6-1
- Add script to discover and monitor DRBD resources
9 years ago
* Wed Sep 9 2015 Daniel B. <daniel@firewall-services.com> - 0.2.5-1
- Support negative values for temp sensors
9 years ago
* Mon Jul 27 2015 Daniel B. <daniel@firewall-services.com> - 0.2.4-1
- Several enhancements in sensors ini generator
* Fri Jul 24 2015 Daniel B. <daniel@firewall-services.com> - 0.2.3-1
- Separate UPS default threshold
- Minor coding style updates
9 years ago
* Mon Jul 20 2015 Daniel B. <daniel@firewall-services.com> - 0.2.2-1
- Start working on perl libs to reduce code duplication
- Detect nut UPS temp sensors
10 years ago
* Fri Jul 10 2015 Daniel B. <daniel@firewall-services.com> - 0.2.1-1
- Fix GlusterFS brick count on 3.7.x
10 years ago
* Fri Jul 10 2015 Daniel B. <daniel@firewall-services.com> - 0.2.0-1
- Migrate sensors config to an ini format
- Add a generator script which detects available sensors
10 years ago
* Tue Jul 7 2015 Daniel B. <daniel@firewall-services.com> - 0.1.27-1
- Support different sensors types
10 years ago
* Thu Jun 4 2015 Daniel B. <daniel@firewall-services.com> - 0.1.26-1
- Alert if a self heal is in progress on a glusterfs vol
10 years ago
* Thu Jun 4 2015 Daniel B. <daniel@firewall-services.com> - 0.1.25-1
- Fix gluster checks if info heal-failed is not supported
10 years ago
* Wed Apr 15 2015 Daniel B. <daniel@firewall-services.com> - 0.1.24-1
- Report a warning if a RAID array is resyncing
10 years ago
* Tue Feb 10 2015 Daniel B. <daniel@firewall-services.com> - 0.1.23-1
- Fix disco_filesystem to output valid JSON
10 years ago
* Thu Jan 8 2015 Daniel B. <daniel@firewall-services.com> - 0.1.22-1
- Fix check_qmail_sudo
10 years ago
* Mon Jan 5 2015 Daniel B. <daniel@firewall-services.com> - 0.1.21-1
- Add scripts to check qmail (requires qmqtool)
10 years ago
* Fri Nov 7 2014 Daniel B. <daniel@firewall-services.com> - 0.1.20-1
- discover LVM thin pools
- report LVM thin pools allocation
10 years ago
* Sun Sep 14 2014 Daniel B. <daniel@firewall-services.com> - 0.1.19-1
- Adapt squidclient commands to work with squid 3.1
11 years ago
* Wed Jul 16 2014 Daniel B. <daniel@firewall-services.com> - 0.1.18-1
- Add simple discovery and status check for GlusterFS
11 years ago
* Thu Jul 10 2014 Daniel B. <daniel@firewall-services.com> - 0.1.17-1
- Add discovery for MegaRAID controllers
11 years ago
* Wed Jul 9 2014 Daniel B. <daniel@firewall-services.com> - 0.1.16-1
- Add discovery script for mdadm based RAID devices
11 years ago
* Tue May 6 2014 Daniel B. <daniel@firewall-services.com> - 0.1.15-1
- Add a simple script to check nmb lookups
11 years ago
* Wed Feb 19 2014 Daniel B. <daniel@firewall-services.com> - 0.1.14-1
11 years ago
- remove scripts to discover and monitor certificates, they are too specific
11 years ago
and are now in smeserver-zabbix-agent
11 years ago
* Tue Feb 18 2014 Daniel B. <daniel@firewall-services.com> - 0.1.13-1
- Move phpki conf to the correct location
11 years ago
* Tue Feb 18 2014 Daniel B. <daniel@firewall-services.com> - 0.1.12-1
- Add scripts to discover and monitor certificates (design to work with PHPki)
11 years ago
* Fri Nov 29 2013 Daniel B. <daniel@firewall-services.com> - 0.1.11-1
- Possibility to disable hosts monitoring in BackupPC by adding
$Conf{ZabbixMonitoring} = 0 in the conf file
11 years ago
* Mon Oct 28 2013 Daniel B. <daniel@firewall-services.com> - 0.1.10-1
- Do not skip removable devices in disco_block_device
11 years ago
* Tue Oct 1 2013 Daniel B. <daniel@firewall-services.com> - 0.1.9-1
- Fix macros names in disco_raid_hp_sudo script
11 years ago
* Tue Oct 1 2013 Daniel B. <daniel@firewall-services.com> - 0.1.8-1
- Add simple scripts to monitor HP Smart Arrays
12 years ago
* Tue Apr 23 2013 Daniel B. <daniel@firewall-services.com> - 0.1.7-1
- Initialize an empty array in disco_backuppc_sudo
- Return more usefull macros in disco_backuppc_sudo
- Skip some blocks (loop, ram, dm) in disco_smart_sudo
12 years ago
* Mon Apr 22 2013 Daniel B. <daniel@firewall-services.com> - 0.1.6-1
- Fix permissions on sudoers fragment
- Use full path to smartctl binary
12 years ago
* Mon Apr 22 2013 Daniel B. <daniel@firewall-services.com> - 0.1.5-1
- Rewrite disco_smart_sudo in perl
12 years ago
* Thu Apr 18 2013 Daniel B. <daniel@firewall-services.com> - 0.1.4-1
- Possibility to pass a (base64 encoded) regex for backuppc hosts discovery
- Add nut ups scripts
- Fix lvm discovery on some systems
* Thu Apr 18 2013 Daniel B. <daniel@firewall-services.com> - 0.1.3-1
- Comment the manual net.if.discovery key
12 years ago
* Thu Apr 18 2013 Daniel B. <daniel@firewall-services.com> - 0.1.2-1
- Add network interface discovery scripts
- do not prepend /dev to block devices (not supported on older Zabbix agent)
12 years ago
* Wed Apr 17 2013 Daniel B. <daniel@firewall-services.com> - 0.1.1-1
- Fix a typo in smart.conf
* Wed Apr 17 2013 Daniel B. <daniel@firewall-services.com> - 0.1.0-1
12 years ago
- Initial release