forked from opinkerfi/okconfig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
okconfig.spec
282 lines (253 loc) · 12.5 KB
/
okconfig.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
%{!?python_version: %define python_version %(%{__python} -c "from distutils.sysconfig import get_python_version; print get_python_version()")}
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%define is_suse %(test -e /etc/SuSE-release && echo 1 || echo 0)
Summary: Python Nagios Template management and configuration power tools
Name: okconfig
Version: 1.1.1
Release: 1%{?dist}
Source0: http://opensource.is/files/%{name}-%{version}.tar.gz
License: GPLv2
Group: System Environment/Libraries
Requires: python >= 2.3
BuildRequires: python-devel
%if %is_suse
BuildRequires: gettext-devel
%else
%if 0%{?fedora} >= 16
BuildRequires: python-setuptools
%else
%if 0%{?fedora} >= 8
BuildRequires: python-setuptools-devel
%else
%if 0%{?rhel} >= 5
BuildRequires: python-setuptools
%endif
%endif
%endif
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Url: http://opensource.is/trac
BuildArch: noarch
Requires: pynag python-paramiko winexe
Requires: nagios nagios-plugins-nrpe nagios-plugins-ping nagios-plugins-ssh
Requires: nagios-okplugin-apc nagios-okplugin-brocade nagios-okplugin-mailblacklist
Requires: nagios-okplugin-check_disks nagios-okplugin-check_time nagios-plugins-fping
%description
A robust template mechanism for Nagios configuration files. Providing
standardized set of configuration templates and select quality plugins
to enterprise quality monitoring.
%prep
%setup -q
%build
%{__python} setup.py build
%install
test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --prefix=/usr --root=$RPM_BUILD_ROOT
install -m 755 -d usr/share/okconfig $RPM_BUILD_ROOT/%{_datadir}/%{name}
mkdir -p $RPM_BUILD_ROOT/etc/bash_completion.d/
mkdir -p $RPM_BUILD_ROOT/etc/profile.d/
mkdir -m 775 -p $RPM_BUILD_ROOT/etc/nagios/okconfig
mkdir -m 775 -p $RPM_BUILD_ROOT/etc/nagios/okconfig/groups
mkdir -m 775 -p $RPM_BUILD_ROOT/etc/nagios/okconfig/hosts
mkdir -m 775 -p $RPM_BUILD_ROOT/etc/nagios/okconfig/templates
mkdir -m 775 -p $RPM_BUILD_ROOT/etc/nagios/okconfig/examples
install -m 644 etc/okconfig.conf $RPM_BUILD_ROOT/%{_sysconfdir}/
install -m 644 etc/bash_completion.d/* $RPM_BUILD_ROOT/%{_sysconfdir}/bash_completion.d/
install -m 644 etc/profile.d/* $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d/
%clean
rm -fr $RPM_BUILD_ROOT
%files
%defattr(-, root, root, -)
%if "%{python_version}" >= "2.5"
%{python_sitelib}/okconfig*.egg-info
%endif
%dir %{python_sitelib}/okconfig
%{python_sitelib}/okconfig/*.py*
%{_bindir}/okconfig
%doc AUTHORS README.md LICENSE CHANGES
%{_datadir}/%{name}
%config(noreplace) %{_sysconfdir}/profile.d/nagios.csh
%config(noreplace) %{_sysconfdir}/profile.d/nagios.sh
%config(noreplace) %{_sysconfdir}/okconfig.conf
%config(noreplace) %{_sysconfdir}/bash_completion.d/okconfig
%config(noreplace) %{_sysconfdir}/logrotate.d/okconfig
#%{_mandir}/man1/okconfig.1.gz
%defattr(0775, nagios, nagios)
%attr(0770, nagios, nagios) %dir %{_localstatedir}/log/okconfig
%dir %{_sysconfdir}/nagios/okconfig
%dir %{_sysconfdir}/nagios/okconfig/groups
%dir %{_sysconfdir}/nagios/okconfig/hosts
%dir %{_sysconfdir}/nagios/okconfig/templates
%dir %{_sysconfdir}/nagios/okconfig/examples
%post
# If upgrading, then run okconfig upgrade
if [ $1 == 2 ]; then
okconfig upgrade
else
okconfig init
okconfig addgroup default
fi
%changelog
* Tue Apr 30 2013 Pall Sigurdsson <[email protected]> 1.1.1-1
- Version bump
* Tue Apr 30 2013 Pall Sigurdsson <[email protected]> 1.1.0-1
- New release
* Tue Apr 30 2013 Pall Sigurdsson <[email protected]>
- Version bump
* Tue Apr 30 2013 Pall Sigurdsson <[email protected]> 1.0.11-1
- CHANGES updated ([email protected])
- http template, support for port and virtual_host macros ([email protected])
- Fix missing ipa check command ([email protected])
- Added default ldaps connection to HOSTNAME ([email protected])
- Added IPA support to okconfig ([email protected])
- Merge branch 'master' of github.com:opinkerfi/okconfig ([email protected])
- Added support for os-release and fedora 16-18 ([email protected])
- support for comma seperated list of templates in addtemplate
- Fix warning about git global not being declared ([email protected])
- git commit on changes support ([email protected])
- Merge branch 'master' of github.com:opinkerfi/okconfig ([email protected])
- new configuration option: git_commit_changes ([email protected])
- Fix #28 okconfig.cfg->add examples_directory_local ([email protected])
- Missing quote for pipe in check_procs.sh ([email protected])
- Missing quoting of backticks for check_procs.sh ([email protected])
- Removed strong quoting for check_procs.sh ([email protected])
- Closes 27 - Strong quoting cpu and proc checks ([email protected])
- Added support for checking suspended RHCS services ([email protected])
- Fix missing auth parameters in EMC check portstate ([email protected])
* Fri Oct 26 2012 Pall Sigurdsson <[email protected]> 1.0.10-1
- Merge branch 'master' of github.com:opinkerfi/okconfig ([email protected])
- removed nsclient directory ([email protected])
* Fri Oct 26 2012 Pall Sigurdsson <[email protected]> 1.0.9-1
- SNMP Connectivity removed from proliant example. Closes #5
- okconfig group default is now always created on install (Closes #9)
- --alias now supported with host templates ([email protected])
- windows update logo added ([email protected])
- Error handling improved on okconfig commands ([email protected])
- Apache example bugfixes ([email protected])
- add 'okconfig upgrade' to %%post section of rpm spec ([email protected])
- subcommands listtemplates and listhosts added ([email protected])
- addcontact: contact name can now be specified as argument from command-line
- addcontact contact_groups changed to contactgroups ([email protected])
- storwize templates added ([email protected])
- notes logo change ([email protected])
- wmi test added ([email protected])
- Brocade templates reworked ([email protected])
- icon updates ([email protected])
- passive host template updated ([email protected])
- APC templates reworked. Templates for all equipment supported by
check_apcext.pl ([email protected])
- mge logo added ([email protected])
- windows logo added ([email protected])
- aix logo updated ([email protected])
- fix command_line for okc-check_https_certificate for rhel6 compatibility
- Added missing _SNMP_COMMUNITY macro ([email protected])
- Added monitoring templates for ACRC cooling units from apc
- fixed typo in brocade example ([email protected])
- check_cpu script now included in script ([email protected])
- experimental suse support for install_agent ([email protected])
- subprocess typo fixed ([email protected])
- except ValueError changed to except KeyError ([email protected])
- help_function.runCommand now uses stdin=subprocess.PIPE ([email protected])
- Fix okconfig install breaking on failures ([email protected])
- Various bugfixes ([email protected])
- host example now uses new okc-check_ping ([email protected])
- okc-check_ping added ([email protected])
- traceroute function added. ([email protected])
- subprocess module added to imports ([email protected])
- Added preliminary http support ([email protected])
- path updated for check_gearman ([email protected])
- Gearman tests added to nagios template ([email protected])
- Merge branch 'master' of github.com:opinkerfi/okconfig ([email protected])
- fedora16 support deprecated for fedora17 ([email protected])
* Fri Aug 17 2012 Pall Sigurdsson <[email protected]> 1.0.8-1
- MMCSS added to default excluded services ([email protected])
- "okconfig upgrade" now also detects deprecated host and service notification
commands (Closes #8) ([email protected])
- fixed need for dns lookup to find default ip address ([email protected])
- invalid check_commands fixed in emc templates ([email protected])
- fixed typo in smbclient parameters ([email protected])
- Merge branch 'master' of github.com:opinkerfi/okconfig ([email protected])
- check_nrpe check command renamed to okc-check_nrpe ([email protected])
- Object definition rewritten (tommi@darkstar)
- Object definition rewritten (tommi@darkstar)
- Added register 0 to dell openmanage templates ([email protected])
- bugfix, fixed mixing of sets and list in get_template ([email protected])
- Nagios config up-to-date added to nagios example ([email protected])
- fixed unhandled exception when examples_directory_local does not exist
- Templates for Dell Openmanage monitoring added ([email protected])
- Bugfix, get_templates() now returns templates that only exist in the local
templates directory ([email protected])
- bugfix where rhel6 distro was skipped ([email protected])
- debian support for install_okagent.sh ([email protected])
- cleanup of print statements ([email protected])
- Merge branch 'master' of https://opensource.ok.is/git/okconfig
- template cleanup ([email protected])
- HOSTNAME, multi-inheritance removed ([email protected])
- Added missing register 0 for oracle and apache ([email protected])
- runCommand() moved to helper_functions module ([email protected])
- .idea added to .gitignore ([email protected])
- releasers.conf updated to include source tarballs ([email protected])
- Merge branch 'master' of https://opensource.ok.is/git/okconfig
- releasers.conf updated and is now split into production and testing
- host-passive template renamed to .cfg-example ([email protected])
* Thu Jul 12 2012 Pall Sigurdsson <[email protected]> 1.0.7-1
- Getting rid of multi-inheritance in examples ([email protected])
- unspecified group in addtemplate now uses the same group as host
* Wed Jul 11 2012 Pall Sigurdsson <[email protected]> 1.0.6-1
- support for local .examples files implemented ([email protected])
- improvements to remote installation for windows ([email protected])
- dependencies for .spec file updated. Winexe fixes ([email protected])
- install_okagent.sh placed for linux agent installation ([email protected])
- install_nrpe and install_nsclient implemented ([email protected])
- Default thresholds for linux check_proc increased to warning=500
critical=1000 ([email protected])
- init subcommand feature added ([email protected])
- bugfix in removehost when removing multiple hosts ([email protected])
- okconfig- deprecated and removed ([email protected])
- okc- prefix added to all commands. migrate script included
- removehost functionality added ([email protected])
- etc/nagios/okconfig/templates directory added to rpm ([email protected])
* Thu May 31 2012 Tomas Edwardsson <[email protected]> 1.0.5-7
- Fixed permissions in spec file for /etc/nagios/okconfig ([email protected])
- bash_completion updated to reflect new syntax ([email protected])
- groups now autogenerated if specified by addhost ([email protected])
- error handling added ([email protected])
- help and --help options added ([email protected])
- command line arguments redesigned (again) ([email protected])
* Wed May 30 2012 Tomas Edwardsson <[email protected]> 1.0.5-1
- Fixed rsync path for tito, was missing root user ([email protected])
- Added F17 to tito build ([email protected])
- new okconfig binary with new syntax ([email protected])
- Merge branch 'master' of https://opensource.ok.is/git/okconfig
- addservice function added ([email protected])
- host_template now configurable when adding new hosts ([email protected])
- Issue #55, removed mssql till requirements are satisfied ([email protected])
- rhcs6 examples added ([email protected])
* Mon Mar 12 2012 Pall Sigurdsson <[email protected]> 1.0.4-1
- / added to end of every reponame. okconfig.spec now support fedora 16
- added more repos to releasers.conf ([email protected])
* Mon Mar 12 2012 Pall Sigurdsson <[email protected]> 1.0.3-1
- tito releasers.conf added ([email protected])
- manpages commented out ([email protected])
* Mon Mar 12 2012 Pall Sigurdsson <[email protected]> 1.0.2-1
-
* Mon Mar 12 2012 Pall Sigurdsson <[email protected]> 1.0.1-1
- new package built with tito
* Sun Oct 1 2011 Tomas Edwardsson <[email protected]> - 1.0-9
- Fixes to packaging and missing specifications
* Fri Jul 22 2011 Pall Sigurdsson <[email protected]> - 1.0-1
- Initial RPM Creation, based heavily on the func spec file