From 7b0b7035100a8aa1c197a8fe8301d83e2f1fb2b6 Mon Sep 17 00:00:00 2001 From: Michael Erdely Date: Thu, 9 Jan 2025 17:55:11 -0500 Subject: [PATCH] Fix other Splunk Add-on references Replace all references to Splunk Add-on with Technical Add-on Replace URLs Remove splunkbase stuff Add copyright --- README.txt | 8 ++++++-- .../js_sdk_extensions/scripted_inputs.js | 2 +- appserver/static/setup.js | 16 ++++++++-------- bin/bandwidth.sh | 1 + bin/cpu_metric.sh | 1 + bin/df.sh | 1 + bin/df_metric.sh | 1 + bin/hardware.sh | 1 + bin/interfaces_metric.sh | 1 + bin/iostat_metric.sh | 1 + bin/ps_metric.sh | 1 + bin/rlog.sh | 1 + bin/selinuxChecker.sh | 1 + bin/setup.sh | 13 +++++++------ bin/setupservice.py | 7 ++++--- bin/update.sh | 1 + bin/vmstat.sh | 1 + bin/vmstat_metric.sh | 1 + default/app.conf | 6 +++--- .../ui/views/ta_nix_configuration.env_cloud.xml | 5 +++-- default/data/ui/views/ta_nix_configuration.xml | 10 +++++----- default/props.conf | 2 +- default/tags.conf | 2 +- default/transforms.conf | 2 +- 24 files changed, 53 insertions(+), 33 deletions(-) diff --git a/README.txt b/README.txt index f5f01df..ec5d99b 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,8 @@ -Splunk Add-on for Unix and Linux +Technical Add-on for Unix and Linux +Copyright (C) 2025 Michael Erdely All Rights Reserved. Copyright (C) 2024 Splunk Inc. All Rights Reserved. -For documentation, see: https://docs.splunk.com/Documentation/AddOns/released/UnixLinux/ +For documentation, see: https://git.erdelynet.com/mike/TA-unix/src/branch/main/docs/ReleaseNotes.md + +For documentation on Splunk's Add-on for Unix and Linux (which applies to this TA too), see: +https://docs.splunk.com/Documentation/AddOns/released/UnixLinux/ diff --git a/appserver/static/components/js_sdk_extensions/scripted_inputs.js b/appserver/static/components/js_sdk_extensions/scripted_inputs.js index 47337ce..9ce94b8 100644 --- a/appserver/static/components/js_sdk_extensions/scripted_inputs.js +++ b/appserver/static/components/js_sdk_extensions/scripted_inputs.js @@ -25,7 +25,7 @@ define([ root.ScriptedInput = root.Entity.extend({ path: function () { // Approximate path - accepts reads only - // ex: data/inputs/script/%2FApplications%2Fsplunk_622light_unix%2Fetc%2Fapps%2FSplunk_TA_nix%2Fbin%2Fcpu.sh + // ex: data/inputs/script/%2FApplications%2Fsplunk_622light_unix%2Fetc%2Fapps%2FTA-unix%2Fbin%2Fcpu.sh return Paths.monitorInputs + '/' + encodeURIComponent(this.name) }, diff --git a/appserver/static/setup.js b/appserver/static/setup.js index cfca2cf..88547d4 100644 --- a/appserver/static/setup.js +++ b/appserver/static/setup.js @@ -9,8 +9,8 @@ require([ 'splunkjs/mvc/simplexml/ready!', 'underscore', 'jquery', - '../app/Splunk_TA_nix/components/js_sdk_extensions/scripted_inputs', - '../app/Splunk_TA_nix/components/js_sdk_extensions/monitor_inputs' + '../app/TA-unix/components/js_sdk_extensions/scripted_inputs', + '../app/TA-unix/components/js_sdk_extensions/monitor_inputs' ], function (mvc, ignored, _, $, sdkx_scripted_inputs, sdkx_monitor_inputs) { var ScriptedInputs = sdkx_scripted_inputs.ScriptedInputs var MonitorInputs = sdkx_monitor_inputs.MonitorInputs @@ -66,11 +66,11 @@ require([ var monitorInputs = {} new MonitorInputs(service, { owner: '-', - app: 'Splunk_TA_nix', + app: 'TA-unix', sharing: 'app' }).fetch(function (err, inputs) { var inputsList = _.filter(inputs.list(), function (input) { - return input.namespace.app === 'Splunk_TA_nix' + return input.namespace.app === 'TA-unix' }) _.each(inputsList, function (input) { @@ -93,7 +93,7 @@ require([ var scriptedMetricInputs = {} new ScriptedInputs(service, { owner: '-', - app: 'Splunk_TA_nix', + app: 'TA-unix', sharing: 'app' }).fetch(function (err, inputs) { var inputsList = _.filter(inputs.list(), function (input) { @@ -101,7 +101,7 @@ require([ .substring(input.name.lastIndexOf('/') + 1) .split('_') return ( - input.namespace.app === 'Splunk_TA_nix' && + input.namespace.app === 'TA-unix' && input_name[input_name.length - 1] === 'metric.sh' ) }) @@ -129,7 +129,7 @@ require([ var scriptedEventInputs = {} new ScriptedInputs(service, { owner: '-', - app: 'Splunk_TA_nix', + app: 'TA-unix', sharing: 'app' }).fetch(function (err, inputs) { var inputsList = _.filter(inputs.list(), function (input) { @@ -137,7 +137,7 @@ require([ .substring(input.name.lastIndexOf('/') + 1) .split('_') return ( - input.namespace.app === 'Splunk_TA_nix' && + input.namespace.app === 'TA-unix' && input_name[input_name.length - 1] !== 'metric.sh' ) }) diff --git a/bin/bandwidth.sh b/bin/bandwidth.sh index da3ee0f..10bb027 100755 --- a/bin/bandwidth.sh +++ b/bin/bandwidth.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/bin/cpu_metric.sh b/bin/cpu_metric.sh index 3f12dd6..b1f30f6 100755 --- a/bin/cpu_metric.sh +++ b/bin/cpu_metric.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/bin/df.sh b/bin/df.sh index 4689cd4..be0a901 100755 --- a/bin/df.sh +++ b/bin/df.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/bin/df_metric.sh b/bin/df_metric.sh index 12d79a1..4888ea0 100755 --- a/bin/df_metric.sh +++ b/bin/df_metric.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/bin/hardware.sh b/bin/hardware.sh index 31eefec..81c68e9 100755 --- a/bin/hardware.sh +++ b/bin/hardware.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/bin/interfaces_metric.sh b/bin/interfaces_metric.sh index d6a75ef..2ab3ff6 100755 --- a/bin/interfaces_metric.sh +++ b/bin/interfaces_metric.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/bin/iostat_metric.sh b/bin/iostat_metric.sh index da1550e..80d101b 100755 --- a/bin/iostat_metric.sh +++ b/bin/iostat_metric.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/bin/ps_metric.sh b/bin/ps_metric.sh index 30f0878..81d601a 100755 --- a/bin/ps_metric.sh +++ b/bin/ps_metric.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/bin/rlog.sh b/bin/rlog.sh index 72ae084..a791ca6 100755 --- a/bin/rlog.sh +++ b/bin/rlog.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 # diff --git a/bin/selinuxChecker.sh b/bin/selinuxChecker.sh index e819196..6599aab 100755 --- a/bin/selinuxChecker.sh +++ b/bin/selinuxChecker.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/bin/setup.sh b/bin/setup.sh index 3b1ef92..9a39542 100755 --- a/bin/setup.sh +++ b/bin/setup.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 @@ -237,7 +238,7 @@ function show_inputs script_list=$(get_script_list) for line in $script_list; do case "$line" in - *unix* | *Splunk_TA_nix* ) get_scripted_input_status "$line"; input_counter=`expr $input_counter + 1`; + *unix* | *TA-unix* ) get_scripted_input_status "$line"; input_counter=`expr $input_counter + 1`; esac done echo "" @@ -267,7 +268,7 @@ function enable_all_inputs fi if [ "$res" == "success" ] && [[ ( $line != *"_metric"* || $flag == 1 ) ]]; then case "$line" in - *unix* | *Splunk_TA_nix* ) echo "enabling $line"; input_endpoint=$(build_scripted_input_endpoint "$line"); enable_scripted_input $input_endpoint;; + *unix* | *TA-unix* ) echo "enabling $line"; input_endpoint=$(build_scripted_input_endpoint "$line"); enable_scripted_input $input_endpoint;; esac fi done @@ -289,7 +290,7 @@ function disable_all_inputs script_list=$(get_script_list) for line in $script_list; do case "$line" in - *unix* | *Splunk_TA_nix* ) echo "disabling $line"; input_endpoint=$(build_scripted_input_endpoint "$line"); disable_scripted_input $input_endpoint;; + *unix* | *TA-unix* ) echo "disabling $line"; input_endpoint=$(build_scripted_input_endpoint "$line"); disable_scripted_input $input_endpoint;; esac done for line in $MONITOR_INPUTS; do @@ -388,7 +389,7 @@ function clone_all_inputs script_list=$(get_script_list) for line in $script_list; do case "$line" in - *unix* | *Splunk_TA_nix* ) echo ""; echo " cloning $line to $server_name"; echo ""; scripted_clone "$line" + *unix* | *TA-unix* ) echo ""; echo " cloning $line to $server_name"; echo ""; scripted_clone "$line" esac done for line in $MONITOR_INPUTS; do @@ -642,7 +643,7 @@ function select_input_menu script_list=$(get_script_list) for line in $script_list; do case "$line" in - *unix* | *Splunk_TA_nix* ) echo " $input_counter - $line"; selection_list[$input_counter]=$line; input_counter=`expr $input_counter + 1`; + *unix* | *TA-unix* ) echo " $input_counter - $line"; selection_list[$input_counter]=$line; input_counter=`expr $input_counter + 1`; esac done for line in $MONITOR_INPUTS; do @@ -882,7 +883,7 @@ function set_unix_app_info for line in $app_output; do case "$line" in *unix* ) set_app_installed "unix";; - *Splunk_TA_nix* ) set_app_installed "Splunk_TA_nix";; + *TA-unix* ) set_app_installed "TA-unix";; *ENABLED*) set_app_enabled;; #*DISABLED*) set_app_disabled;; esac diff --git a/bin/setupservice.py b/bin/setupservice.py index 5bba8ed..65e98ca 100644 --- a/bin/setupservice.py +++ b/bin/setupservice.py @@ -1,3 +1,4 @@ +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 @@ -20,19 +21,19 @@ class SetupService(splunk.rest.BaseRestHandler): sessionKey = self.sessionKey try: conf = bundle.getConf( - "app", sessionKey, namespace="Splunk_TA_nix", owner="nobody" + "app", sessionKey, namespace="TA-unix", owner="nobody" ) stanza = conf.stanzas["install"].findKeys("is_configured") if stanza: if stanza["is_configured"] == "0" or stanza["is_configured"] == "false": conf["install"]["is_configured"] = "true" splunk.rest.simpleRequest( - "/apps/local/Splunk_TA_nix/_reload", sessionKey=sessionKey + "/apps/local/TA-unix/_reload", sessionKey=sessionKey ) else: conf["install"]["is_configured"] = "true" splunk.rest.simpleRequest( - "/apps/local/Splunk_TA_nix/_reload", sessionKey=sessionKey + "/apps/local/TA-unix/_reload", sessionKey=sessionKey ) except Exception as e: self.response.write(e) diff --git a/bin/update.sh b/bin/update.sh index 85f0732..81d09cf 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/bin/vmstat.sh b/bin/vmstat.sh index 178c09f..a14b9da 100755 --- a/bin/vmstat.sh +++ b/bin/vmstat.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/bin/vmstat_metric.sh b/bin/vmstat_metric.sh index e0c56e2..2a5d159 100755 --- a/bin/vmstat_metric.sh +++ b/bin/vmstat_metric.sh @@ -1,4 +1,5 @@ #!/bin/sh +# Copyright (C) 2025 Michael Erdely All Rights Reserved. # SPDX-FileCopyrightText: 2024 Splunk, Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/default/app.conf b/default/app.conf index 444c420..5d81fbe 100644 --- a/default/app.conf +++ b/default/app.conf @@ -20,9 +20,9 @@ author = Michael Erdely version = 9.2.0.1 description = Technical Add-on for Unix and Linux -[package] -id = TA-unix -check_for_updates = true +#[package] +#id = TA-unix +#check_for_updates = true [id] name = TA-unix diff --git a/default/data/ui/views/ta_nix_configuration.env_cloud.xml b/default/data/ui/views/ta_nix_configuration.env_cloud.xml index 4968e7e..03f46f5 100644 --- a/default/data/ui/views/ta_nix_configuration.env_cloud.xml +++ b/default/data/ui/views/ta_nix_configuration.env_cloud.xml @@ -4,11 +4,12 @@ --> - + -

Please set up this add-on on your forwarders. Documentation on how to configure this add-on is +

Please set up this add-on on your forwarders. Documentation on how to configure this add-on, + which is the same as the Splunk Add-on for Unix and Linux, is here.
Click on below button, if you are getting redirected to this page while editing the add-on's knowledge object. diff --git a/default/data/ui/views/ta_nix_configuration.xml b/default/data/ui/views/ta_nix_configuration.xml index 9164c27..8b44507 100644 --- a/default/data/ui/views/ta_nix_configuration.xml +++ b/default/data/ui/views/ta_nix_configuration.xml @@ -10,15 +10,15 @@ || It has no effect on Splunk Enterprise. --> - +

- The Splunk Add-on for Unix and Linux provides pre-built data inputs to facilitate + The Technical Add-on for Unix and Linux provides pre-built data inputs to facilitate Linux and Unix system monitoring using Splunk. Check out the - - Splunk for Unix Technical Add-on - page on Splunkbase + + Technical Add-on for Unix and Linux + page for support information, the latest updates, and more.

diff --git a/default/props.conf b/default/props.conf index 66efd54..ea03dea 100644 --- a/default/props.conf +++ b/default/props.conf @@ -549,7 +549,7 @@ FIELDALIAS-dest = host as dest # Stanzas in this section are legacy configuration stanzas # intended to support parsing of data created by scripts in # TA-deploymentapps, which has since been retired. Systems that use -# Splunk_TA_nix on the search head but which may be searching data +# TA-unix on the search head but which may be searching data # from forwarders on which the older scripts are still in use should # be able to search new and old data seamlessly. diff --git a/default/tags.conf b/default/tags.conf index 3c14e47..3e38c29 100644 --- a/default/tags.conf +++ b/default/tags.conf @@ -652,7 +652,7 @@ os = enabled # Stanzas in this section are legacy configuration stanzas # intended to support parsing of data created by scripts in # TA-deploymentapps, which has since been retired. Systems that use -# Splunk_TA_nix on the search head but which may be searching data +# TA-unix on the search head but which may be searching data # from forwarders on which the older scripts are still in use should # be able to search new and old data seamlessly. diff --git a/default/transforms.conf b/default/transforms.conf index e0183dc..6d8ba2a 100644 --- a/default/transforms.conf +++ b/default/transforms.conf @@ -459,7 +459,7 @@ FORMAT = signature::$1 # Stanzas in this section are legacy configuration stanzas # intended to support parsing of data created by scripts in # TA-deploymentapps, which has since been retired. Systems that use -# Splunk_TA_nix on the search head but which may be searching data +# TA-unix on the search head but which may be searching data # from forwarders on which the older scripts are still in use should # be able to search new and old data seamlessly.