]>
Commit | Line | Data |
---|---|---|
9cd8f43f MWP |
1 | # TODO - add another |
2 | %define namesrc cacti_templates | |
3 | %include /usr/lib/rpm/macros.perl | |
4 | Summary: Plugin for Cacti - Links | |
5 | Summary(pl.UTF-8): Wtyczka do Cacti - Links | |
6 | Name: cacti-addons | |
7 | Version: 0.1 | |
8 | Release: 0.1 | |
9 | License: GPL v2 | |
10 | Group: Applications/WWW | |
11 | # Cacti Poller Statistics - http://forums.cacti.net/about18057-0-asc-0.html | |
f39be15f | 12 | Source0: http://forums.cacti.net/files/ss_poller.php.gz |
9cd8f43f | 13 | # Source0-md5: 5de3f1cfeb5803a9c76a6e1472dd2478 |
f39be15f | 14 | Source1: http://forums.cacti.net/files/cacti_host_template_local_cacti_polling_host_171.xml |
9cd8f43f | 15 | # Source1-md5: 3f54a6579f06745426163685facac558 |
f39be15f MWP |
16 | # Adding template from command line - http://forums.cacti.net/about8827.html |
17 | Source2: http://forums.cacti.net/files/add_template.zip | |
b1765be8 | 18 | # Source2-md5: a38f01091cb4bf1dbd86db29d6c4c966 |
62f678a7 MWP |
19 | # DNS Server Response Time - http://forums.cacti.net/about6332.html |
20 | #TODO - patch path | |
21 | Source3: http://forums.cacti.net/files/cacti_graph_template_dnsresponsetime_204__fixed_timeout_and_interval_161.xml | |
22 | # Source3-md5: abf46930508377099b37d696648ce7de | |
23 | Source4: http://forums.cacti.net/files/dnsresponsetimeloop_115.txt | |
24 | # Source4-md5: 0844f7d58ff77904416dee5b120c31cf | |
9cd8f43f MWP |
25 | URL: http://www.debianhelp.co.uk/cactitemplates.htm |
26 | BuildRequires: rpm-perlprov | |
27 | Requires: cacti | |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
f39be15f MWP |
31 | %define webcactiroot /usr/share/cacti |
32 | %define webcactiscriptdir %{webcactiroot}/scripts | |
33 | %define webcactiscrptserverdir %{webcactiroot}/resource/script_server | |
34 | %define webcactiscriptqueriesdir %{webcactiroot}/resource/script_queries | |
35 | %define webcactisnmpqueriesdir %{webcactiroot}/resource/snmp_queries | |
9cd8f43f MWP |
36 | |
37 | %description | |
38 | Templates and scripts for Cacti. | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | Skrypty i templaty dla Cacti. | |
42 | ||
43 | %package Cacti_Poller_Statistics | |
44 | Summary: Statistics for Cacti Poller | |
45 | Summary(pl.UTF-8): Statystyki działania Pollera Cacti | |
46 | Group: Applications/WWW | |
47 | ||
48 | %description Cacti_Poller_Statistics | |
49 | Statistics for Cacti Poller, works with localhost only. | |
50 | ||
51 | %description Cacti_Poller_Statistics -l pl.UTF-8 | |
52 | Statystyki działania Pollera Cacti, działa tylko lokalnie. | |
53 | ||
f39be15f MWP |
54 | %package cmd_line_add_template |
55 | Summary: Adding template for Cacti from command line | |
56 | Summary(pl.UTF-8): Dodawanie template dla cacti z lini poleceń | |
57 | Group: Applications/WWW | |
58 | ||
59 | %description cmd_line_add_template | |
62f678a7 MWP |
60 | Adding template for Cacti from command line. Usage : |
61 | /usr/share/cacti/cacti/add_template.php your_template.xml | |
f39be15f MWP |
62 | |
63 | %description cmd_line_add_template -l pl.UTF-8 | |
62f678a7 MWP |
64 | Dodawanie template dla cacti z lini poleceń. Usage : |
65 | /usr/share/cacti/cacti/add_template.php your_template.xml | |
66 | ||
67 | %package DNS_Server_Response_Time | |
68 | Summary: Cacti - Measure the response times of multiple internal and external DNS Resolver | |
69 | Summary(pl.UTF-8): Cacti - | |
70 | Group: Applications/WWW | |
71 | ||
72 | %description DNS_Server_Response_Time | |
73 | Measure the response times of multiple internal and external DNS | |
74 | Resolvers. The Perl script launches queries repeatedly (after holdoff | |
75 | delay between queries) during Cacti default sample intervall of 300 | |
76 | seconds and the returns minimum, median, average and maximum response | |
77 | times. | |
f39be15f | 78 | |
9cd8f43f MWP |
79 | %prep |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
f39be15f | 83 | |
9cd8f43f MWP |
84 | install -d $RPM_BUILD_ROOT{%{webcactiscriptdir},%{webcactiscriptqueriesdir},%{webcactisnmpqueriesdir},%{webcactiscrptserverdir}} |
85 | gzip -dc %{SOURCE0} > $RPM_BUILD_ROOT%{webcactiscriptdir}/ss_poller.php | |
86 | install %{SOURCE1} $RPM_BUILD_ROOT%{webcactiscriptqueriesdir}/cacti_host_template_local_cacti_polling_host.xml | |
87 | ||
f39be15f MWP |
88 | unzip -x -d $RPM_BUILD_ROOT%{webcactiroot} %{SOURCE2} |
89 | ||
62f678a7 MWP |
90 | install %{SOURCE4} $RPM_BUILD_ROOT%{webcactiscriptqueriesdir}/cacti_graph_template_dnsresponsetime.xml |
91 | install %{SOURCE4} $RPM_BUILD_ROOT%{webcactiscriptdir}/dnsResponseTime.pl | |
92 | ||
9cd8f43f MWP |
93 | %clean |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
f39be15f MWP |
96 | %post |
97 | ||
9cd8f43f MWP |
98 | %files Cacti_Poller_Statistics |
99 | %defattr(644,root,root,755) | |
62f678a7 | 100 | %attr(755,root,root) %{webcactiscriptdir}/ss_poller.php |
9cd8f43f | 101 | %{webcactiscriptqueriesdir}/cacti_host_template_local_cacti_polling_host.xml |
f39be15f MWP |
102 | |
103 | %files cmd_line_add_template | |
104 | %defattr(644,root,root,755) | |
105 | %attr(755,root,root) %{webcactiroot}/cacti/add_template.php | |
62f678a7 MWP |
106 | |
107 | %files DNS_Server_Response_Time | |
108 | %defattr(644,root,root,755) | |
109 | %attr(755,root,root) %{webcactiscriptdir}/dnsResponseTime.pl | |
110 | %{webcactiscriptqueriesdir}/cacti_graph_template_dnsresponsetime.xml |