File check_mk-check-raritan_pdu_outlets.spec of Package check_mk-check-raritan_pdu_outlets

# spec file for package check_mk-check-raritan_pdu_outlets
# Copyright (c) 2014 SUSE LINUX Products 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

Name:           check_mk-check-raritan_pdu_outlets
%define         check_name raritan_pdu_outlets
Summary:        Raritan PDU SNMP Checks
License:        GPL-2.0
Group:          System/Monitoring
Version:        1.0
Release:        0
Source0:        raritan_pdu_outlets-1.0.mkp
Requires(pre):  check_mk >= 1.2.2
BuildArch:      noarch
BuildRequires:  nagios-rpm-macros
BuildRequires:  gzip
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

The Raritan PDU SNMP check fetches the following values via SNMP:
* name of the outlet (used as item)
* operationalState
* Current
* Voltage
* ActivePower
* ApparentPower
* PowerFactor
* CurrentUpperWarning
* CurrentUpperCritical
and creates a check for each outlet.

%setup -q -T -c %name -a0
tar -xf checks.tar


install -D -m644 raritan_pdu_outlets %{buildroot}%{livestatus_checksdir}/%{check_name}
install -D -m644 info %{buildroot}%{livestatus_vardir}/packages/%{check_name}

rm -rf %buildroot