File monitoring-plugins-traffic_limit.spec of Package monitoring-plugins-traffic_limit
#
# spec file for package monitoring-plugins-traffic_limit
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: monitoring-plugins-traffic_limit
Version: 0.3
Release: 0
Summary: Checks the traffic on any interface
License: BSD-4-Clause
Group: System/Monitoring
Url: http://exchange.nagios.org/directory/Plugins/Network-Connections%2C-Stats-and-Bandwidth/check_traffic_limit/details
Source0: check_traffic_limit_%{version}_20110209.tar.gz
BuildRequires: nagios-rpm-macros
Provides: nagios-plugins-traffic_limit = %{version}-%{release}
Obsoletes: nagios-plugins-traffic_limit < %{version}-%{release}
Requires: gawk
Requires: grep
Requires: vnstat
Requires: perl(Nagios::Plugin)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
check_traffic_limit is a Nagios plugin based on vnstat. It checks the traffic
on any interface and sends a warning when defined daily or monthly limits are
reached. The plugin comes with Nagios grapher templates.
Example:
./check_traffic_limit -i eth0 -w 10000 -c 12000 -p d
%prep
%setup -q -n check_traffic_limit_%{version}
%build
%install
install -Dm755 check_traffic_limit %{buildroot}/%{nagios_plugindir}/check_traffic_limit
install -Dm644 check_traffic_limit.ncfg %{buildroot}/%{nagiosgrapher_sysconfdir}/check_traffic_limit.ncfg
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc CHANGES README
%dir %{nagios_libdir}
%dir %{nagios_plugindir}
%attr(0755,root,%{nagios_command_group}) %dir %{nagios_sysconfdir}
%dir %{nagiosgrapher_sysconfdir}
%{nagios_plugindir}/check_traffic_limit
%config(noreplace) %{nagiosgrapher_sysconfdir}/check_traffic_limit.ncfg
%changelog