diff --git a/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-inspect b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-inspect new file mode 100755 index 000000000..370b70a69 --- /dev/null +++ b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-inspect @@ -0,0 +1,16 @@ +#!/bin/bash + +# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one +# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + + + +. /usr/sbin/so-elastic-fleet-common + +{% if grains.role == 'so-heavynode' %} +docker exec so-elastic-agent /bin/elastic-agent inspect +{% else %} +/bin/elastic-agent inspect +{% endif %} diff --git a/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-restart b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-restart new file mode 100755 index 000000000..717df6fbd --- /dev/null +++ b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-restart @@ -0,0 +1,16 @@ +#!/bin/bash + +# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one +# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + + + +. /usr/sbin/so-elastic-fleet-common + +{% if grains.role == 'so-heavynode' %} +docker exec so-elastic-agent service elastic-agent restart +{% else %} +service elastic-agent restart +{% endif %} diff --git a/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-start b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-start new file mode 100755 index 000000000..bd4829332 --- /dev/null +++ b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-start @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one +# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + + + +. /usr/sbin/so-elastic-fleet-common + +{% if grains.role == 'so-heavynode' %} +docker exec so-elastic-agent service elastic-agent start +{% else %} +service elastic-agent start +{% endif %} + diff --git a/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-status b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-status new file mode 100755 index 000000000..f27c63b9f --- /dev/null +++ b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-status @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one +# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + + + +. /usr/sbin/so-elastic-fleet-common + +{% if grains.role == 'so-heavynode' %} +docker exec so-elastic-agent /bin/elastic-agent status +{% else %} +/bin/elastic-agent status +{% endif %} + diff --git a/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-stop b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-stop new file mode 100755 index 000000000..c974d3e06 --- /dev/null +++ b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-stop @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one +# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + + + +. /usr/sbin/so-elastic-fleet-common + +{% if grains.role == 'so-heavynode' %} +docker exec so-elastic-agent service elastic-agent stop +{% else %} +service elastic-agent stop +{% endif %} + diff --git a/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-version b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-version new file mode 100755 index 000000000..781250a30 --- /dev/null +++ b/salt/elasticfleet/tools/sbin_jinja/so-elastic-agent-version @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one +# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + + + +. /usr/sbin/so-elastic-fleet-common + +{% if grains.role == 'so-heavynode' %} +docker exec so-elastic-agent /bin/elastic-agent version +{% else %} +/bin/elastic-agent version +{% endif %} +