diff --git a/perfsonar-logstash/perfsonar-logstash/Makefile b/perfsonar-logstash/perfsonar-logstash/Makefile index 5327a61..270b569 100644 --- a/perfsonar-logstash/perfsonar-logstash/Makefile +++ b/perfsonar-logstash/perfsonar-logstash/Makefile @@ -25,5 +25,4 @@ endif cp -r pipeline/* ${ROOTPATH}/pipeline cp -r ruby/* ${ROOTPATH}/ruby cp -r scripts/* ${ROOTPATH}/scripts - cp -r pipeline_etc/* ${CONFIGPATH} cp -r systemd/* ${SYSTEMDPATH}/logstash.service.d/ diff --git a/perfsonar-logstash/perfsonar-logstash/pipeline/99-outputs.conf b/perfsonar-logstash/perfsonar-logstash/pipeline/99-outputs.conf index e676a99..6111bae 100644 --- a/perfsonar-logstash/perfsonar-logstash/pipeline/99-outputs.conf +++ b/perfsonar-logstash/perfsonar-logstash/pipeline/99-outputs.conf @@ -6,7 +6,8 @@ output { ssl_certificate_verification => false user => "${opensearch_output_user}" password => "${opensearch_output_password}" - index => "pscheduler_%{[test][type]}-%{+YYYY.MM.dd}" + action => "create" + index => "pscheduler_%{[test][type]}" } } } diff --git a/perfsonar-logstash/perfsonar-logstash/pipeline_etc/logstash_sysconfig b/perfsonar-logstash/perfsonar-logstash/pipeline_etc/logstash_sysconfig deleted file mode 100644 index 442f811..0000000 --- a/perfsonar-logstash/perfsonar-logstash/pipeline_etc/logstash_sysconfig +++ /dev/null @@ -1,6 +0,0 @@ -## Logstash environment variables. -log_level=info -opensearch_output_host=https://localhost:9200 -opensearch_output_user=pscheduler_logstash -opensearch_output_password=pscheduler_logstash -XPACK_MONITORING_ENABLED=False diff --git a/perfsonar-logstash/perfsonar-logstash/scripts/install_logstash_sysconfig.sh b/perfsonar-logstash/perfsonar-logstash/scripts/install_logstash_sysconfig.sh deleted file mode 100644 index 2344087..0000000 --- a/perfsonar-logstash/perfsonar-logstash/scripts/install_logstash_sysconfig.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -if [ -e '/etc/redhat-release' ]; then - OS="redhat" -elif [ -e '/etc/debian_version' ]; then - OS="lif [ -e '/etc/debian_version' ]; then" -else - OS="Unknown" -fi - -if [[ $OS == "redhat" ]]; then - if [ ! -e /etc/sysconfig/logstash ]; then - ln -s /etc/perfsonar/logstash/logstash_sysconfig /etc/sysconfig/logstash - fi -elif [[ $OS == "debian" ]]; then - if [ -e /etc/default/logstash ]; then - cat /etc/perfsonar/logstash/logstash_sysconfig >> /etc/default/logstash - else - ln -s /etc/perfsonar/logstash/logstash_sysconfig /etc/default/logstash - fi -else - echo "$0 - [ERROR]: Unknown operating system" - exit 1 -fi \ No newline at end of file diff --git a/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/deb/perfsonar-logstash.install b/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/deb/perfsonar-logstash.install index cf5ea56..e060578 100644 --- a/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/deb/perfsonar-logstash.install +++ b/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/deb/perfsonar-logstash.install @@ -1,4 +1,3 @@ pipeline/* /usr/lib/perfsonar/logstash/pipeline/ scripts/* /usr/lib/perfsonar/logstash/scripts/ ruby/* /usr/lib/perfsonar/logstash/ruby/ -pipeline_etc/logstash_sysconfig /etc/perfsonar/logstash/ diff --git a/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/deb/perfsonar-logstash.postinst b/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/deb/perfsonar-logstash.postinst index ab64628..36709a3 100644 --- a/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/deb/perfsonar-logstash.postinst +++ b/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/deb/perfsonar-logstash.postinst @@ -2,13 +2,13 @@ # postinst script for perfsonar-logstash # assign file and directory permissions +mkdir -p /etc/perfsonar/logstash chown -R perfsonar:perfsonar /usr/lib/perfsonar/logstash /etc/perfsonar/logstash chmod 644 $(find /usr/lib/perfsonar/logstash -type f) $(find /etc/perfsonar/logstash -type f) chmod 755 $(find /usr/lib/perfsonar/logstash -type d) $(find /etc/perfsonar/logstash -type d) /usr/lib/perfsonar/logstash/scripts/* # run logstash configuration scripts python3 /usr/lib/perfsonar/logstash/scripts/update_logstash_pipeline_yml.py -bash /usr/lib/perfsonar/logstash/scripts/install_logstash_sysconfig.sh # add systemd override to logstash timeout mkdir /etc/systemd/system/logstash.service.d diff --git a/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/rpm/perfsonar-logstash.spec b/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/rpm/perfsonar-logstash.spec index 4e9ba10..e8b130b 100644 --- a/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/rpm/perfsonar-logstash.spec +++ b/perfsonar-logstash/perfsonar-logstash/unibuild-packaging/rpm/perfsonar-logstash.spec @@ -47,9 +47,6 @@ rm -rf %{buildroot} #update logstash pipelines.yml %{scripts_base}/update_logstash_pipeline_yml.py -#Point at logstash settings -%{scripts_base}/install_logstash_sysconfig.sh - #Restart/enable logstash %systemd_post logstash.service if [ "$1" = "1" ]; then @@ -69,7 +66,6 @@ fi %license LICENSE %config(noreplace) %{pipeline_base}/01-inputs.conf %config(noreplace) %{pipeline_base}/99-outputs.conf -%config(noreplace) %{config_base}/logstash_sysconfig %config(noreplace) %{_sysconfdir}/systemd/system/logstash.service.d/* %attr(0755, perfsonar, perfsonar) %{scripts_base}/* #Use globs so don't dupicate config files above