Skip to content

Commit

Permalink
Got around push issue, so adding rest of logstash updates
Browse files Browse the repository at this point in the history
  • Loading branch information
arlake228 committed Oct 26, 2023
1 parent 734067d commit 5bc5173
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
plugin/logstash-output-plugin-offline-7.17.9.zip /usr/lib/perfsonar/logstash/plugin/
plugin/logstash-output-plugin-offline-8.10.4.zip /usr/lib/perfsonar/logstash/plugin/
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ if [ ! -z "$PLUGIN_INSTALLED" ]; then
#if upgrade, safely remove old plugin before adding new
systemctl stop logstash
/usr/share/logstash/bin/logstash-plugin remove $PLUGIN_INSTALLED
/usr/share/logstash/bin/logstash-plugin install file:/usr/lib/perfsonar/logstash/plugin/logstash-output-plugin-offline-7.17.9.zip
/usr/share/logstash/bin/logstash-plugin install file:/usr/lib/perfsonar/logstash/plugin/logstash-output-plugin-offline-8.10.4.zip
systemctl start logstash
else
/usr/share/logstash/bin/logstash-plugin install file:/usr/lib/perfsonar/logstash/plugin/logstash-output-plugin-offline-7.17.9.zip
/usr/share/logstash/bin/logstash-plugin install file:/usr/lib/perfsonar/logstash/plugin/logstash-output-plugin-offline-8.10.4.zip
fi

#DEBHELPER#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
%define install_base /usr/lib/perfsonar/
%define logstash_base %{install_base}/logstash
%define plugin_base %{logstash_base}/plugin
%define plugin_version 8.10.4

#Version variables set by automated scripts
%define perfsonar_auto_version 5.1.0
Expand Down Expand Up @@ -39,12 +40,12 @@ rm -rf %{buildroot}
%post
if [ "$1" = "1" ]; then
#if new install, add plugin to logstash
/usr/share/logstash/bin/logstash-plugin install file:%{plugin_base}/logstash-output-plugin-offline-7.17.9.zip
/usr/share/logstash/bin/logstash-plugin install file:%{plugin_base}/logstash-output-plugin-offline-%{plugin_version}.zip
else
#if upgrade, safely remove old plugin before adding new
systemctl stop logstash.service
/usr/share/logstash/bin/logstash-plugin remove logstash-output-opensearch
/usr/share/logstash/bin/logstash-plugin install file:%{plugin_base}/logstash-output-plugin-offline-7.17.9.zip
/usr/share/logstash/bin/logstash-plugin install file:%{plugin_base}/logstash-output-plugin-offline-%{plugin_version}.zip
systemctl start logstash.service
fi

Expand All @@ -59,7 +60,7 @@ fi
%files
%defattr(0644,perfsonar,perfsonar,0755)
%license LICENSE
%attr(0755, logstash, logstash) %{plugin_base}/logstash-output-plugin-offline-7.17.9.zip
%attr(0755, logstash, logstash) %{plugin_base}/logstash-output-plugin-offline-%{plugin_version}.zip

%changelog
* Sun Mar 21 2021 [email protected] 4.4.0-0.0.a1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ chmod 755 $(find /usr/lib/perfsonar/logstash -type d) $(find /etc/perfsonar/logs

# run logstash configuration scripts
python3 /usr/lib/perfsonar/logstash/scripts/update_logstash_pipeline_yml.py
#make sure httpd input plugin is updated
/usr/share/logstash/bin/logstash-plugin update logstash-input-http_poller

# add systemd override to logstash timeout
mkdir /etc/systemd/system/logstash.service.d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ rm -rf %{buildroot}
%post
#update logstash pipelines.yml
%{scripts_base}/update_logstash_pipeline_yml.py
#make sure httpd input plugin is updated
/usr/share/logstash/bin/logstash-plugin update logstash-input-http_poller

#Restart/enable logstash
%systemd_post logstash.service
Expand Down

0 comments on commit 5bc5173

Please sign in to comment.