2017-08-23 17:30:54 +02:00
|
|
|
%if 0%{?rhel} && 0%{?rhel} < 5
|
|
|
|
%global _without_selinux 1
|
|
|
|
%endif
|
|
|
|
|
2013-04-15 10:49:30 +02:00
|
|
|
Summary: Scripts for Zabbix monitoring
|
|
|
|
Name: zabbix-agent-addons
|
2017-08-23 17:30:54 +02:00
|
|
|
Version: 0.2.17
|
|
|
|
Release: 0.beta1
|
2013-04-15 10:49:30 +02:00
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
License: GPL
|
|
|
|
Group: Virtualization
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-buildroot
|
|
|
|
Prefix: %{_prefix}
|
|
|
|
Requires: zabbix-agent
|
2013-04-15 15:04:11 +02:00
|
|
|
Requires: perl(Getopt::Long)
|
|
|
|
Requires: perl(Getopt::Std)
|
|
|
|
Requires: perl(JSON)
|
|
|
|
Requires: perl(Linux::LVM)
|
|
|
|
Requires: perl(POSIX)
|
2013-04-19 11:30:48 +02:00
|
|
|
Requires: perl(MIME::Base64)
|
2014-07-16 11:07:54 +02:00
|
|
|
Requires: perl(File::Which)
|
2015-07-10 10:30:28 +02:00
|
|
|
Requires: perl(Config::Simple)
|
2017-08-23 17:30:54 +02:00
|
|
|
%if ! 0%{?_without_selinux}
|
|
|
|
Requires: policycoreutils
|
|
|
|
BuildRequires: selinux-policy-devel
|
|
|
|
BuildRequires: checkpolicy
|
|
|
|
%endif
|
2013-04-15 15:04:11 +02:00
|
|
|
|
|
|
|
AutoReqProv: no
|
2013-04-15 10:49:30 +02:00
|
|
|
|
|
|
|
%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
|
2017-08-23 17:30:54 +02:00
|
|
|
%if ! 0%{?_without_selinux}
|
|
|
|
pushd selinux
|
|
|
|
make -f %{_datadir}/selinux/devel/Makefile
|
|
|
|
popd
|
|
|
|
%endif
|
2013-04-15 10:49:30 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
|
|
%{__rm} -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
# Install zabbix scripts
|
2013-04-15 15:04:11 +02:00
|
|
|
%{__install} -d -m 750 $RPM_BUILD_ROOT%{_localstatedir}/lib/zabbix/bin
|
2013-04-15 10:49:30 +02:00
|
|
|
%{__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/
|
2013-04-17 13:44:06 +02:00
|
|
|
%{__install} -m 0644 zabbix_conf/* $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/zabbix_agentd.conf.d/
|
2015-07-22 17:32:33 +02:00
|
|
|
# Install perl modules
|
|
|
|
%{__install} -d -m 0755 $RPM_BUILD_ROOT%{perl_vendorlib}
|
|
|
|
cp -r lib/* $RPM_BUILD_ROOT%{perl_vendorlib}/
|
2013-04-15 18:43:43 +02:00
|
|
|
# Install sensors conf
|
2015-07-10 10:30:28 +02:00
|
|
|
%{__install} -m 0755 conf/sensors.ini $RPM_BUILD_ROOT%{_sysconfdir}/zabbix/
|
2013-04-15 10:49:30 +02:00
|
|
|
# Install sudo conf
|
|
|
|
%{__install} -d 750 $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d
|
2013-04-15 15:04:11 +02:00
|
|
|
%{__install} -m 600 conf/sudo.conf $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d/zabbix_agent
|
2017-08-23 17:30:54 +02:00
|
|
|
# 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
|
2013-04-15 10:49:30 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
%{__rm} -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
2015-07-10 10:30:28 +02:00
|
|
|
|
2013-04-15 10:49:30 +02:00
|
|
|
%preun
|
|
|
|
|
|
|
|
%post
|
2015-07-10 10:30:28 +02:00
|
|
|
if [ $1 -eq 2 ] ; then
|
2015-07-08 11:31:37 +02:00
|
|
|
if [ -e "/etc/zabbix/sensors.conf" ]; then
|
2015-07-10 10:30:28 +02:00
|
|
|
/var/lib/zabbix/bin/util_convert_sensors_ini /etc/zabbix/sensors.conf
|
2015-07-08 11:31:37 +02:00
|
|
|
fi
|
|
|
|
fi
|
2013-04-15 10:49:30 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc README CHANGELOG.git
|
2013-04-15 15:04:11 +02:00
|
|
|
%dir %attr(0750,zabbix,zabbix) %{_localstatedir}/lib/zabbix/bin
|
|
|
|
%{_localstatedir}/lib/zabbix/bin/*
|
2015-07-22 17:32:33 +02:00
|
|
|
%{perl_vendorlib}
|
2015-07-10 10:30:28 +02:00
|
|
|
%config(noreplace) %attr(0640,root,zabbix) %{_sysconfdir}/zabbix/sensors.ini
|
2013-04-16 10:55:00 +02:00
|
|
|
%config(noreplace) %attr(0640,root,zabbix) %{_sysconfdir}/zabbix/zabbix_agentd.conf.d/*
|
2013-04-22 18:35:50 +02:00
|
|
|
%attr(0440,root,root) %{_sysconfdir}/sudoers.d/*
|
2017-08-23 17:30:54 +02:00
|
|
|
%{_datadir}/selinux/packages/%{name}/%{name}.pp
|
2013-04-15 10:49:30 +02:00
|
|
|
|
|
|
|
%changelog
|
2017-08-23 17:30:54 +02:00
|
|
|
* Wed Aug 23 2017 Daniel Berteaud <daniel@firewall-services.com> - 0.2.17-1
|
|
|
|
- Add a SELinux policy module
|
|
|
|
|
2017-06-14 16:04:35 +02:00
|
|
|
* Wed Jun 14 2017 Daniel Berteaud <daniel@firewall-services.com> - 0.2.16-1
|
|
|
|
- Add kernel.openedfile UserParameter
|
|
|
|
|
2016-11-24 16:42:33 +01:00
|
|
|
* 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)
|
|
|
|
|
2016-11-09 18:51:49 +01:00
|
|
|
* Wed Nov 9 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.14-1
|
|
|
|
- Add scripts to monitor apache httpd
|
|
|
|
|
2016-10-31 15:06:35 +01:00
|
|
|
* Sun Oct 30 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.13-1
|
|
|
|
- Fix handling Airflow_Temperature_Cel label
|
|
|
|
|
2016-10-28 12:54:31 +02:00
|
|
|
* 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
|
|
|
|
|
2016-09-01 18:37:43 +02:00
|
|
|
* Thu Sep 1 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.11-1
|
|
|
|
- Add support for lm_sensors based sensors
|
|
|
|
|
2016-08-25 11:06:51 +02:00
|
|
|
* Thu Aug 25 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.10-1
|
|
|
|
- Add monitoring item for squid's FD
|
|
|
|
|
2016-04-06 13:58:21 +02:00
|
|
|
* Wed Apr 6 2016 Daniel Berteaud <daniel@firewall-services.com> - 0.2.9-1
|
|
|
|
- Detect HDD temp sensors on sat+megaraid controllers
|
|
|
|
|
2016-03-21 10:26:51 +01:00
|
|
|
* Mon Mar 21 2016 Daniel B. <daniel@firewall-services.com> - 0.2.8-1
|
|
|
|
- Prevent running several gluster check commands at the same time
|
|
|
|
|
2015-09-16 18:15:33 +02:00
|
|
|
* Wed Sep 16 2015 Daniel B. <daniel@firewall-services.com> - 0.2.7-1
|
|
|
|
- Prevent GlusterFS heal false positive due to concurrent locking
|
|
|
|
|
2015-09-15 10:07:16 +02:00
|
|
|
* Mon Sep 14 2015 Daniel B. <daniel@firewall-services.com> - 0.2.6-1
|
|
|
|
- Add script to discover and monitor DRBD resources
|
|
|
|
|
2015-09-10 09:16:40 +02:00
|
|
|
* Wed Sep 9 2015 Daniel B. <daniel@firewall-services.com> - 0.2.5-1
|
|
|
|
- Support negative values for temp sensors
|
|
|
|
|
2015-07-27 16:31:25 +02:00
|
|
|
* 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
|
|
|
|
|
2015-07-22 17:32:33 +02:00
|
|
|
* 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
|
|
|
|
|
2015-07-10 12:51:01 +02:00
|
|
|
* Fri Jul 10 2015 Daniel B. <daniel@firewall-services.com> - 0.2.1-1
|
|
|
|
- Fix GlusterFS brick count on 3.7.x
|
|
|
|
|
2015-07-10 10:30:28 +02:00
|
|
|
* 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
|
|
|
|
|
2015-07-07 15:07:36 +02:00
|
|
|
* Tue Jul 7 2015 Daniel B. <daniel@firewall-services.com> - 0.1.27-1
|
|
|
|
- Support different sensors types
|
|
|
|
|
2015-06-04 16:48:58 +02:00
|
|
|
* 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
|
|
|
|
|
2015-06-04 11:35:56 +02:00
|
|
|
* Thu Jun 4 2015 Daniel B. <daniel@firewall-services.com> - 0.1.25-1
|
|
|
|
- Fix gluster checks if info heal-failed is not supported
|
|
|
|
|
2015-04-15 18:06:47 +02:00
|
|
|
* Wed Apr 15 2015 Daniel B. <daniel@firewall-services.com> - 0.1.24-1
|
|
|
|
- Report a warning if a RAID array is resyncing
|
|
|
|
|
2015-02-10 10:21:09 +01:00
|
|
|
* Tue Feb 10 2015 Daniel B. <daniel@firewall-services.com> - 0.1.23-1
|
|
|
|
- Fix disco_filesystem to output valid JSON
|
|
|
|
|
2015-01-14 13:25:29 +01:00
|
|
|
* Thu Jan 8 2015 Daniel B. <daniel@firewall-services.com> - 0.1.22-1
|
|
|
|
- Fix check_qmail_sudo
|
|
|
|
|
2015-01-05 12:10:10 +01:00
|
|
|
* Mon Jan 5 2015 Daniel B. <daniel@firewall-services.com> - 0.1.21-1
|
|
|
|
- Add scripts to check qmail (requires qmqtool)
|
|
|
|
|
2014-11-12 09:33:39 +01:00
|
|
|
* Fri Nov 7 2014 Daniel B. <daniel@firewall-services.com> - 0.1.20-1
|
|
|
|
- discover LVM thin pools
|
|
|
|
- report LVM thin pools allocation
|
|
|
|
|
2014-09-15 09:42:19 +02:00
|
|
|
* Sun Sep 14 2014 Daniel B. <daniel@firewall-services.com> - 0.1.19-1
|
|
|
|
- Adapt squidclient commands to work with squid 3.1
|
|
|
|
|
2014-07-16 11:07:54 +02:00
|
|
|
* Wed Jul 16 2014 Daniel B. <daniel@firewall-services.com> - 0.1.18-1
|
|
|
|
- Add simple discovery and status check for GlusterFS
|
|
|
|
|
2014-07-10 13:00:19 +02:00
|
|
|
* Thu Jul 10 2014 Daniel B. <daniel@firewall-services.com> - 0.1.17-1
|
|
|
|
- Add discovery for MegaRAID controllers
|
|
|
|
|
2014-07-09 16:31:46 +02:00
|
|
|
* Wed Jul 9 2014 Daniel B. <daniel@firewall-services.com> - 0.1.16-1
|
|
|
|
- Add discovery script for mdadm based RAID devices
|
|
|
|
|
2014-05-06 13:01:44 +02:00
|
|
|
* Tue May 6 2014 Daniel B. <daniel@firewall-services.com> - 0.1.15-1
|
|
|
|
- Add a simple script to check nmb lookups
|
|
|
|
|
2014-02-19 09:31:54 +01:00
|
|
|
* Wed Feb 19 2014 Daniel B. <daniel@firewall-services.com> - 0.1.14-1
|
2014-07-10 13:00:19 +02:00
|
|
|
- remove scripts to discover and monitor certificates, they are too specific
|
2014-02-19 09:31:54 +01:00
|
|
|
and are now in smeserver-zabbix-agent
|
|
|
|
|
2014-02-18 18:27:20 +01:00
|
|
|
* Tue Feb 18 2014 Daniel B. <daniel@firewall-services.com> - 0.1.13-1
|
|
|
|
- Move phpki conf to the correct location
|
|
|
|
|
2014-02-18 17:26:05 +01:00
|
|
|
* 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)
|
|
|
|
|
2013-11-29 09:56:43 +01:00
|
|
|
* 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
|
|
|
|
|
2013-10-28 18:31:22 +01:00
|
|
|
* Mon Oct 28 2013 Daniel B. <daniel@firewall-services.com> - 0.1.10-1
|
|
|
|
- Do not skip removable devices in disco_block_device
|
|
|
|
|
2013-10-01 14:17:22 +02:00
|
|
|
* Tue Oct 1 2013 Daniel B. <daniel@firewall-services.com> - 0.1.9-1
|
|
|
|
- Fix macros names in disco_raid_hp_sudo script
|
|
|
|
|
2013-10-01 13:05:02 +02:00
|
|
|
* Tue Oct 1 2013 Daniel B. <daniel@firewall-services.com> - 0.1.8-1
|
|
|
|
- Add simple scripts to monitor HP Smart Arrays
|
|
|
|
|
2013-04-23 17:15:00 +02:00
|
|
|
* 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
|
|
|
|
|
2013-04-22 19:21:26 +02:00
|
|
|
* 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
|
|
|
|
|
2013-04-22 16:54:37 +02:00
|
|
|
* Mon Apr 22 2013 Daniel B. <daniel@firewall-services.com> - 0.1.5-1
|
|
|
|
- Rewrite disco_smart_sudo in perl
|
|
|
|
|
2013-04-19 11:30:48 +02:00
|
|
|
* 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
|
|
|
|
|
2013-04-18 08:49:51 +02:00
|
|
|
* 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)
|
|
|
|
|
2013-04-17 14:00:00 +02:00
|
|
|
* Wed Apr 17 2013 Daniel B. <daniel@firewall-services.com> - 0.1.1-1
|
|
|
|
- Fix a typo in smart.conf
|
|
|
|
|
2013-04-17 13:44:06 +02:00
|
|
|
* Wed Apr 17 2013 Daniel B. <daniel@firewall-services.com> - 0.1.0-1
|
2013-04-15 10:49:30 +02:00
|
|
|
- Initial release
|
|
|
|
|