From 644f32c78040abe3be028891e8ef4464c4f629d8052f0403a066940c0a5fb3e6 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Sat, 5 Nov 2011 16:04:26 +0000 Subject: [PATCH 1/7] - added first set of macros for check_mk aka livestatus OBS-URL: https://build.opensuse.org/package/show/server:monitoring/nagios-rpm-macros?expand=0&rev=12 --- macros.check_mk | 35 +++++++++++++++++++++++++++++++++++ nagios-rpm-macros.changes | 5 +++++ nagios-rpm-macros.spec | 10 ++++++++-- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 macros.check_mk diff --git a/macros.check_mk b/macros.check_mk new file mode 100644 index 0000000..44c6659 --- /dev/null +++ b/macros.check_mk @@ -0,0 +1,35 @@ +# +# directories and files for check_mk +# +# place for livestatus.o libdir +%livestatus_libdir %{_prefix}/lib/check_mk +# livesock +%livestatus_socket_file %{nagios_spooldir}/livestatus.cmd +# livebackendsdir +livestatus_livebackendsdir %{_datadir}/check_mk/livestatius +# confdir +livestatus_sysconfdir %{_sysconfdir}/check_mk +# check_mk_configdir +livestatus_check_mk_configdir %{livestatus_sysconfdir}/conf.d +# +livestatus_datadir %{_datadir}/check_mk +# agentsdir +livestatus_agentsdir %{_datadir}/check_mk/agents +# checksdir +livestatus_checksdir %{_datadir}/check_mk/checks +# modulesdir +livestatus_modulesdir %{_datadir}/check_mk/modules +# web_dir +livestatus_webdir %{_datadir}/check_mk/web +# vardir +livestatus_vardir %{_var}/lib/check_mk +# agentslibdir +livestatus_agentslibdir %{_prefix}/lib/check_mk_agent +# agentsconfdir +livestatus_agentsconfdir %{livestatus_sysconfdir} +# htdocsdir +livestatus_htdocsdir %{nagios_datadir} +# nagconfdir +livestatus_nagconfdir %{nagios_sysconfdir}/check_mk.d +# rrddir +livestatus_rrddir %{_var}/lib/check_mk/rrd diff --git a/nagios-rpm-macros.changes b/nagios-rpm-macros.changes index 9a13350..62be2f2 100644 --- a/nagios-rpm-macros.changes +++ b/nagios-rpm-macros.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Nov 5 16:03:58 UTC 2011 - lars@linux-schulserver.de + +- added first set of macros for check_mk aka livestatus + ------------------------------------------------------------------- Tue Nov 1 12:55:27 UTC 2011 - lars@linux-schulserver.de diff --git a/nagios-rpm-macros.spec b/nagios-rpm-macros.spec index 62e108e..415a90c 100644 --- a/nagios-rpm-macros.spec +++ b/nagios-rpm-macros.spec @@ -1,6 +1,8 @@ # # spec file for package nagios-rpm-macros # +# Copyright (c) 2011 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 @@ -10,13 +12,15 @@ # 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/ +# # norootforbuild Name: nagios-rpm-macros Summary: RPM Macros for Nagios based packages -Version: 0.002 +Version: 0.003 Release: 1 Url: http://en.opensuse.org/Nagios License: BSD3c(or similar) @@ -24,12 +28,13 @@ Group: System/Monitoring Source0: macros.nagios Source1: %{name}-README Source2: nagios-rpm-macros-COPYING +Source3: macros.check_mk BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This package provides rpm macros for building packages for -Nagios and/or Icinga. +Nagios, check_mk and/or Icinga. %prep @@ -40,6 +45,7 @@ Nagios and/or Icinga. %install install -Dm644 %{S:0} %{buildroot}%{_sysconfdir}/rpm/macros.nagios +cat %{S:3} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios %clean rm -rf %buildroot From 518f2bf7b09565af2a616efc3767b1f9a8e6dab57caeb87268c4dcbbd8fc0ea1 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Sat, 5 Nov 2011 16:06:50 +0000 Subject: [PATCH 2/7] syntax fix in macros.check_mk OBS-URL: https://build.opensuse.org/package/show/server:monitoring/nagios-rpm-macros?expand=0&rev=13 --- macros.check_mk | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/macros.check_mk b/macros.check_mk index 44c6659..aee2541 100644 --- a/macros.check_mk +++ b/macros.check_mk @@ -6,30 +6,30 @@ # livesock %livestatus_socket_file %{nagios_spooldir}/livestatus.cmd # livebackendsdir -livestatus_livebackendsdir %{_datadir}/check_mk/livestatius +%livestatus_livebackendsdir %{_datadir}/check_mk/livestatius # confdir -livestatus_sysconfdir %{_sysconfdir}/check_mk +%livestatus_sysconfdir %{_sysconfdir}/check_mk # check_mk_configdir -livestatus_check_mk_configdir %{livestatus_sysconfdir}/conf.d +%livestatus_check_mk_configdir %{livestatus_sysconfdir}/conf.d # -livestatus_datadir %{_datadir}/check_mk +%livestatus_datadir %{_datadir}/check_mk # agentsdir -livestatus_agentsdir %{_datadir}/check_mk/agents +%livestatus_agentsdir %{_datadir}/check_mk/agents # checksdir -livestatus_checksdir %{_datadir}/check_mk/checks +%livestatus_checksdir %{_datadir}/check_mk/checks # modulesdir -livestatus_modulesdir %{_datadir}/check_mk/modules +%livestatus_modulesdir %{_datadir}/check_mk/modules # web_dir -livestatus_webdir %{_datadir}/check_mk/web +%livestatus_webdir %{_datadir}/check_mk/web # vardir -livestatus_vardir %{_var}/lib/check_mk +%livestatus_vardir %{_var}/lib/check_mk # agentslibdir -livestatus_agentslibdir %{_prefix}/lib/check_mk_agent +%livestatus_agentslibdir %{_prefix}/lib/check_mk_agent # agentsconfdir -livestatus_agentsconfdir %{livestatus_sysconfdir} +%livestatus_agentsconfdir %{livestatus_sysconfdir} # htdocsdir -livestatus_htdocsdir %{nagios_datadir} +%livestatus_htdocsdir %{nagios_datadir} # nagconfdir -livestatus_nagconfdir %{nagios_sysconfdir}/check_mk.d +%livestatus_nagconfdir %{nagios_sysconfdir}/check_mk.d # rrddir -livestatus_rrddir %{_var}/lib/check_mk/rrd +%livestatus_rrddir %{_var}/lib/check_mk/rrd From b4d5bae32a8391dae10f078e5340d17be249f158be899e2a601d9fd3f2f1b7fc Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Sat, 5 Nov 2011 16:51:24 +0000 Subject: [PATCH 3/7] - added first set of macros for pnp4nagios OBS-URL: https://build.opensuse.org/package/show/server:monitoring/nagios-rpm-macros?expand=0&rev=14 --- macros.pnp4nagios | 13 +++++++++++++ nagios-rpm-macros.changes | 1 + nagios-rpm-macros.spec | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 macros.pnp4nagios diff --git a/macros.pnp4nagios b/macros.pnp4nagios new file mode 100644 index 0000000..7ae72e9 --- /dev/null +++ b/macros.pnp4nagios @@ -0,0 +1,13 @@ +# +# directories and files for pnp4nagios +# +# directory containing template files for pnp +%pnp4nagios_baseurl /pnp +%pnp4nagios_datarootdir %{_datadir}/pnp4nagios +%pnp4nagios_datadir %{_datadir}/pnp4nagios +%pnp4nagios_logdir %{_var}/log/pnp4nagios +%pnp4nagios_perfdata_dir %{_var}/lib/pnp4nagios/perfdata +%pnp4nagios_perfdata_logfile %{_var}/log/pnp4nagios/perfdata.log +%pnp4nagios_perfdata_spooldir %{_var}/spool/pnp4nagios +%pnp4nagios_sysconfdir %{_sysconfdir}/pnp4nagios +%pnp4nagios_templatedir %{_datadir}/pnp4nagios/templates diff --git a/nagios-rpm-macros.changes b/nagios-rpm-macros.changes index 62be2f2..442bcb7 100644 --- a/nagios-rpm-macros.changes +++ b/nagios-rpm-macros.changes @@ -2,6 +2,7 @@ Sat Nov 5 16:03:58 UTC 2011 - lars@linux-schulserver.de - added first set of macros for check_mk aka livestatus +- added first set of macros for pnp4nagios ------------------------------------------------------------------- Tue Nov 1 12:55:27 UTC 2011 - lars@linux-schulserver.de diff --git a/nagios-rpm-macros.spec b/nagios-rpm-macros.spec index 415a90c..c5f1d28 100644 --- a/nagios-rpm-macros.spec +++ b/nagios-rpm-macros.spec @@ -29,6 +29,7 @@ Source0: macros.nagios Source1: %{name}-README Source2: nagios-rpm-macros-COPYING Source3: macros.check_mk +Source4: macros.pnp4nagios BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -46,6 +47,7 @@ Nagios, check_mk and/or Icinga. %install install -Dm644 %{S:0} %{buildroot}%{_sysconfdir}/rpm/macros.nagios cat %{S:3} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios +cat %{S:4} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios %clean rm -rf %buildroot From 440ac9bf908a278c8f5970e35dc11af52ff072fc6896d5c580b9494377da2fa7 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Sun, 6 Nov 2011 08:29:02 +0000 Subject: [PATCH 4/7] - added %livestatus_socketdir OBS-URL: https://build.opensuse.org/package/show/server:monitoring/nagios-rpm-macros?expand=0&rev=15 --- macros.check_mk | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/macros.check_mk b/macros.check_mk index aee2541..e7a5d76 100644 --- a/macros.check_mk +++ b/macros.check_mk @@ -3,26 +3,28 @@ # # place for livestatus.o libdir %livestatus_libdir %{_prefix}/lib/check_mk -# livesock -%livestatus_socket_file %{nagios_spooldir}/livestatus.cmd -# livebackendsdir -%livestatus_livebackendsdir %{_datadir}/check_mk/livestatius -# confdir -%livestatus_sysconfdir %{_sysconfdir}/check_mk -# check_mk_configdir -%livestatus_check_mk_configdir %{livestatus_sysconfdir}/conf.d +# +%livestatus_socketdir %{_var}/spool/check_mk # %livestatus_datadir %{_datadir}/check_mk -# agentsdir -%livestatus_agentsdir %{_datadir}/check_mk/agents -# checksdir -%livestatus_checksdir %{_datadir}/check_mk/checks -# modulesdir -%livestatus_modulesdir %{_datadir}/check_mk/modules -# web_dir -%livestatus_webdir %{_datadir}/check_mk/web +# confdir +%livestatus_sysconfdir %{_sysconfdir}/check_mk # vardir %livestatus_vardir %{_var}/lib/check_mk +# livesock +%livestatus_socket_file %{livestatus_socketdir}/livestatus.cmd +# livebackendsdir +%livestatus_livebackendsdir %{livestatus_datadir}/livestatius +# check_mk_configdir +%livestatus_check_mk_configdir %{livestatus_sysconfdir}/conf.d +# agentsdir +%livestatus_agentsdir %{livestatus_datadir}/agents +# checksdir +%livestatus_checksdir %{livestatus_datadir}/checks +# modulesdir +%livestatus_modulesdir %{livestatus_datadir}/modules +# web_dir +%livestatus_webdir %{livestatus_datadir}/web # agentslibdir %livestatus_agentslibdir %{_prefix}/lib/check_mk_agent # agentsconfdir @@ -32,4 +34,4 @@ # nagconfdir %livestatus_nagconfdir %{nagios_sysconfdir}/check_mk.d # rrddir -%livestatus_rrddir %{_var}/lib/check_mk/rrd +%livestatus_rrddir %{livestatus_libdir}/rrd From 50c48cfe7796e5f3c18b5da8204e32fd82b935c9f29e29778793177f0ee4fc47 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Tue, 29 Nov 2011 13:25:35 +0000 Subject: [PATCH 5/7] - added %pnp4nagios_libdir OBS-URL: https://build.opensuse.org/package/show/server:monitoring/nagios-rpm-macros?expand=0&rev=16 --- macros.pnp4nagios | 1 + nagios-rpm-macros.changes | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/macros.pnp4nagios b/macros.pnp4nagios index 7ae72e9..247732d 100644 --- a/macros.pnp4nagios +++ b/macros.pnp4nagios @@ -6,6 +6,7 @@ %pnp4nagios_datarootdir %{_datadir}/pnp4nagios %pnp4nagios_datadir %{_datadir}/pnp4nagios %pnp4nagios_logdir %{_var}/log/pnp4nagios +%pnp4nagios_libdir %{_var}/lib/pnp4nagios %pnp4nagios_perfdata_dir %{_var}/lib/pnp4nagios/perfdata %pnp4nagios_perfdata_logfile %{_var}/log/pnp4nagios/perfdata.log %pnp4nagios_perfdata_spooldir %{_var}/spool/pnp4nagios diff --git a/nagios-rpm-macros.changes b/nagios-rpm-macros.changes index 442bcb7..dbb27bd 100644 --- a/nagios-rpm-macros.changes +++ b/nagios-rpm-macros.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 29 13:25:23 UTC 2011 - lars@linux-schulserver.de + +- added %pnp4nagios_libdir + ------------------------------------------------------------------- Sat Nov 5 16:03:58 UTC 2011 - lars@linux-schulserver.de From b12a0bc2b30bbd1def6154cf8fdf8ef64e74925fe1b9504eec986c2dcb058d63 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Wed, 7 Dec 2011 15:43:08 +0000 Subject: [PATCH 6/7] - added macros.nagiosgrapher OBS-URL: https://build.opensuse.org/package/show/server:monitoring/nagios-rpm-macros?expand=0&rev=17 --- macros.nagiosgrapher | 2 ++ nagios-rpm-macros.changes | 5 +++++ nagios-rpm-macros.spec | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 macros.nagiosgrapher diff --git a/macros.nagiosgrapher b/macros.nagiosgrapher new file mode 100644 index 0000000..d63bce1 --- /dev/null +++ b/macros.nagiosgrapher @@ -0,0 +1,2 @@ +# used at least by nagios-plugins-traffic_limit +%nagiosgrapher_sysconfdir %{nagios_sysconfdir}/ngraph.d diff --git a/nagios-rpm-macros.changes b/nagios-rpm-macros.changes index dbb27bd..549c370 100644 --- a/nagios-rpm-macros.changes +++ b/nagios-rpm-macros.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Dec 7 15:42:27 UTC 2011 - lars@linux-schulserver.de + +- added macros.nagiosgrapher + ------------------------------------------------------------------- Tue Nov 29 13:25:23 UTC 2011 - lars@linux-schulserver.de diff --git a/nagios-rpm-macros.spec b/nagios-rpm-macros.spec index c5f1d28..192d333 100644 --- a/nagios-rpm-macros.spec +++ b/nagios-rpm-macros.spec @@ -20,7 +20,7 @@ Name: nagios-rpm-macros Summary: RPM Macros for Nagios based packages -Version: 0.003 +Version: 0.004 Release: 1 Url: http://en.opensuse.org/Nagios License: BSD3c(or similar) @@ -30,6 +30,7 @@ Source1: %{name}-README Source2: nagios-rpm-macros-COPYING Source3: macros.check_mk Source4: macros.pnp4nagios +Source5: macros.nagiosgrapher BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -48,6 +49,7 @@ Nagios, check_mk and/or Icinga. install -Dm644 %{S:0} %{buildroot}%{_sysconfdir}/rpm/macros.nagios cat %{S:3} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios cat %{S:4} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios +cat %{S:5} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios %clean rm -rf %buildroot From fb25bd4a2d1a00c384acad4061db088e0a6249475df8f7cebd441a3c0f3d89c4 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Tue, 7 Feb 2012 09:25:59 +0000 Subject: [PATCH 7/7] - added macros.icinga OBS-URL: https://build.opensuse.org/package/show/server:monitoring/nagios-rpm-macros?expand=0&rev=18 --- macros.icinga | 55 +++++++++++++++++++++++++++++++++++++++ nagios-rpm-macros.changes | 5 ++++ nagios-rpm-macros.spec | 14 +++++----- 3 files changed, 67 insertions(+), 7 deletions(-) create mode 100644 macros.icinga diff --git a/macros.icinga b/macros.icinga new file mode 100644 index 0000000..f7c486d --- /dev/null +++ b/macros.icinga @@ -0,0 +1,55 @@ +# macros.icinga file +# macros for Icinga (sub-)package building - handle with care +# + +# +# directories +# + +# install all plugins into this directory +# Please note: we use the old Nagios directory here, as plugins are +# currently compatible +%icinga_plugindir %{_prefix}/lib/nagios/plugins +# install all event handler scripts into this directory +%icinga_eventhandlerdir %{_prefix}/lib/icinga/eventhandler +# files like p1.pl are located directly in this directory +%icinga_libdir %{_prefix}/lib/icinga +# Icinga uses this directory for status files +%icinga_localstatedir %{_var}/lib/icinga +# Icinga configuration should be stored here +%icinga_sysconfdir %{_sysconfdir}/icinga +# Icinga static webpages, stylesheets and theme(s), online documentation +%icinga_datadir %{_datadir}/icinga +# Icinga spool dir (checkresult-dir) +%icinga_spooldir %{_var}/spool/icinga +# Icinga logfile dir +%icinga_logdir %{_var}/log/icinga +# Icinga cgi directory +%icinga_cgidir %{_prefix}/lib/icinga/cgi + +# +# files +# + +# This is the file that Icinga checks for external command requests +%icinga_command_file %{_var}/spool/icinga/icinga.cmd +# This is where the current status of all monitored services and +# hosts is stored. +%icinga_status_file %{_var}/lib/icinga/status.dat +# This is the file that Icinga should use to store host and +# service state information before it shuts down. +%icinga_state_retention_file %{_var}/lib/icinga/retention.dat + +# +# users and groups +# + +# User, Icinga runs under +%icinga_user icinga +# Group, Icinga runs under +%icinga_group icinga +# User, that can execute commands via %{icinga_command_file} +%icinga_command_user wwwrun +# Group, that can execute commands via %{icinga_command_file} +%icinga_command_group icingacmd + diff --git a/nagios-rpm-macros.changes b/nagios-rpm-macros.changes index 549c370..b90e829 100644 --- a/nagios-rpm-macros.changes +++ b/nagios-rpm-macros.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 7 09:25:23 UTC 2012 - lars@linux-schulserver.de + +- added macros.icinga + ------------------------------------------------------------------- Wed Dec 7 15:42:27 UTC 2011 - lars@linux-schulserver.de diff --git a/nagios-rpm-macros.spec b/nagios-rpm-macros.spec index 192d333..8ac0a51 100644 --- a/nagios-rpm-macros.spec +++ b/nagios-rpm-macros.spec @@ -1,7 +1,7 @@ # # spec file for package nagios-rpm-macros # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 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 @@ -15,22 +15,21 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: nagios-rpm-macros Summary: RPM Macros for Nagios based packages -Version: 0.004 -Release: 1 -Url: http://en.opensuse.org/Nagios -License: BSD3c(or similar) +License: BSD-3-Clause Group: System/Monitoring +Version: 0.03 +Release: 0 +Url: http://en.opensuse.org/Nagios Source0: macros.nagios Source1: %{name}-README Source2: nagios-rpm-macros-COPYING Source3: macros.check_mk Source4: macros.pnp4nagios Source5: macros.nagiosgrapher +Source6: macros.icinga BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -50,6 +49,7 @@ install -Dm644 %{S:0} %{buildroot}%{_sysconfdir}/rpm/macros.nagios cat %{S:3} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios cat %{S:4} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios cat %{S:5} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios +cat %{S:6} >> %{buildroot}%{_sysconfdir}/rpm/macros.nagios %clean rm -rf %buildroot