dist: package metrics/access tool and related.
This commit is contained in:
parent
da56d9213b
commit
f84ad329c6
2
Makefile
2
Makefile
@ -22,6 +22,8 @@ install:
|
||||
$(DESTDIR)$(pkgdatadir)/osc-staging.py
|
||||
for i in $(pkgdata_BINS); do ln -s $(pkgdatadir)/$$i $(DESTDIR)$(bindir)/osrt-$${i%.*}; done
|
||||
install -m 755 script/* $(DESTDIR)$(bindir)
|
||||
ln -s $(pkgdatadir)/metrics/access/aggregate.php $(DESTDIR)$(bindir)/osrt-metrics-access-aggregate
|
||||
ln -s $(pkgdatadir)/metrics/access/ingest.php $(DESTDIR)$(bindir)/osrt-metrics-access-ingest
|
||||
cp -R config/* $(DESTDIR)$(sysconfdir)/$(package_name)
|
||||
for dir in dashboards datasources ; do ln -s $(pkgdatadir)/metrics/grafana/provisioning/$$dir.yaml \
|
||||
$(DESTDIR)$(grafana_provisioning_dir)/$$dir/$(package_name).yaml ; done
|
||||
|
27
dist/package/openSUSE-release-tools.spec
vendored
27
dist/package/openSUSE-release-tools.spec
vendored
@ -167,6 +167,24 @@ Suggests: influxdb
|
||||
%description metrics
|
||||
Ingest relevant OBS and annotation data to generate insightful metrics.
|
||||
|
||||
%package metrics-access
|
||||
Summary: Ingest access logs to generate metrics
|
||||
Group: Development/Tools/Other
|
||||
BuildArch: noarch
|
||||
# Used to stream log files.
|
||||
Requires: curl
|
||||
Requires: %{name}-metrics = %{version}
|
||||
Requires: php > 7
|
||||
# Used to install influxdb/influxdb-php.
|
||||
Requires: php-composer
|
||||
# pgrep used in aggregate.php
|
||||
Requires: procps
|
||||
# xzcat for decompressing log files.
|
||||
Requires: xz
|
||||
|
||||
%description metrics-access
|
||||
Ingest download.o.o Apache access logs and generate metrics.
|
||||
|
||||
%package repo-checker
|
||||
Summary: Repository checker service
|
||||
Group: Development/Tools/Other
|
||||
@ -474,6 +492,7 @@ fi
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/osrt-metrics
|
||||
%{_datadir}/%{source_dir}/metrics
|
||||
%exclude %{_datadir}/%{source_dir}/metrics/access
|
||||
%{_datadir}/%{source_dir}/metrics.py
|
||||
%{_datadir}/%{source_dir}/metrics_release.py
|
||||
# To avoid adding grafana as BuildRequires since it does not live in same repo.
|
||||
@ -488,6 +507,14 @@ fi
|
||||
%{_unitdir}/osrt-metrics-release@.service
|
||||
%{_unitdir}/osrt-metrics-release@.timer
|
||||
|
||||
%files metrics-access
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/osrt-metrics-access-aggregate
|
||||
%{_bindir}/osrt-metrics-access-ingest
|
||||
%{_datadir}/%{source_dir}/metrics/access
|
||||
%{_unitdir}/osrt-metrics-access.service
|
||||
%{_unitdir}/osrt-metrics-access.timer
|
||||
|
||||
%files repo-checker
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/osrt-repo_checker
|
||||
|
11
systemd/osrt-metrics-access.service
Normal file
11
systemd/osrt-metrics-access.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=openSUSE Release Tools: metrics - access logs
|
||||
|
||||
[Service]
|
||||
User=osrt-metrics
|
||||
SyslogIdentifier=osrt-metrics
|
||||
ExecStart=/usr/bin/osrt-metrics-access-aggregate
|
||||
RuntimeMaxSec=120 hour
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
11
systemd/osrt-metrics-access.timer
Normal file
11
systemd/osrt-metrics-access.timer
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=openSUSE Release Tools: metrics - access logs
|
||||
|
||||
[Timer]
|
||||
OnBootSec=120
|
||||
# Allow for log rotation to take place on download server.
|
||||
OnCalendar=*-*-* 4:00:00
|
||||
Unit=osrt-metrics-access.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
x
Reference in New Issue
Block a user