mirror of
https://github.com/PaesslerAG/docker-multi-platform-probe.git
synced 2026-02-20 22:15:40 +00:00
Compare commits
14 Commits
v2.0.0
...
docu/manua
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44749872c3 | ||
|
|
b04fc33694 | ||
|
|
198cc27854 | ||
|
|
94519a402f | ||
|
|
546ee7af5e | ||
|
|
dfdc14a586 | ||
|
|
8bb3d9b08b | ||
|
|
19ee055f91 | ||
|
|
07882452e1 | ||
|
|
8a15bb8d94 | ||
|
|
cb62a9faa3 | ||
|
|
08ee7e1398 | ||
|
|
29af404991 | ||
|
|
fd79b23057 |
@@ -57,4 +57,5 @@ VOLUME [ "/config", "/opt/paessler/share/scripts" ]
|
||||
# set WORKDIR to a sane default
|
||||
WORKDIR /
|
||||
|
||||
ENTRYPOINT [ "/run-prtgmpprobe.sh", "service-run" ]
|
||||
ENTRYPOINT [ "/run-prtgmpprobe.sh" ]
|
||||
CMD [ "service-run" ]
|
||||
26
README.md
26
README.md
@@ -17,7 +17,7 @@ We recommend that you always update to the latest version of PRTG via the Auto-U
|
||||
Requires a [NATS server](#install-and-configure-a-nats-server) connection configured in PRTG.
|
||||
|
||||
[prtg-96]: https://www.paessler.com/prtg/history/stable#24.2.96.1315
|
||||
[manual]: https://paessler.canto.global/direct/document/qvou34dmut1uh0gg6mqee3ip2k/K-e9xGiEiT58XzlH3s_Nf-B3lVk/original?content-type=application%2Fpdf&name=Multi-Platform+Probe+Manual.pdf
|
||||
[manual]: https://manuals.paessler.com/multiplatformprobemanual.pdf
|
||||
|
||||
## How to use the multi-platform probe container
|
||||
|
||||
@@ -37,7 +37,7 @@ Paessler GmbH provides the **NATS Server for Paessler PRTG** Windows installer t
|
||||
* Configures the NATS server.
|
||||
* Installs and starts the NATS server service in the background.
|
||||
|
||||
For the installer and step-by-step instructions on how to set up a NATS server on Windows, see section **Step 1: Install a NATS server** in the [Multi-Platform Probe for PRTG (PDF)][manual] manual.
|
||||
For the installer and step-by-step instructions on how to set up a NATS server on Windows, see section **Step 1: Install a NATS server** in the [Multi-Platform Probe for PRTG][manual] manual.
|
||||
|
||||
ℹ️ If you want to deploy your NATS server on a non-Windows system, see the NATS documentation on their website.
|
||||
|
||||
@@ -46,7 +46,7 @@ For the installer and step-by-step instructions on how to set up a NATS server o
|
||||
Once you set up your NATS server, you must configure PRTG to accept connections to the NATS server.
|
||||
This is done from the PRTG web interface via **Setup** | **Cores & Probes** | **[Multi-Platform Probe Connection Settings][prtg-manual:cores]**.
|
||||
|
||||
For step-by-step instructions on how to configure PRTG, see section **Step 2: Configure connection in PRTG** in the [Multi-Platform Probe for PRTG (PDF)][manual] manual.
|
||||
For step-by-step instructions on how to configure PRTG, see section **Step 2: Configure connection in PRTG** in the [Multi-Platform Probe for PRTG][manual] manual.
|
||||
|
||||
[prtg-manual:cores]: https://www.paessler.com/manuals/prtg/core_and_probes#multi_platform_probe_connection
|
||||
|
||||
@@ -66,19 +66,33 @@ nats:
|
||||
```
|
||||
|
||||
You must put the configuration file into the `/config/config.yml` volume of the docker container.
|
||||
For all available configuration options, see [config.full-example.yml](./config/config.full-example.yml).
|
||||
|
||||
ℹ️ The container also used the `/config` volume to store the [multi-platform probe's GID][GID] and therefore cannot be set as read-only (`:ro`) unless you specify the GID as an environment variable.
|
||||
ℹ️ If necessary you can put your custom [CA certificate][TLS] into `/config/certs` and specify it in the `/config/config.yml` as well:
|
||||
|
||||
```yaml
|
||||
access_key: YOUR_PROBE_ACCESS_KEY
|
||||
nats:
|
||||
url: tls://localhost:23561
|
||||
authentication:
|
||||
user: USER
|
||||
password: PASSWORD
|
||||
server_ca: /config/certs/ca.crt
|
||||
```
|
||||
|
||||
ℹ️ The container also used the `/config` volume to store the [multi-platform probe's GID][GID] and therefore cannot be set as read-only (`:ro`) unless you specify the [multi-platform probe's GID][GID] as an environment variable.
|
||||
|
||||
You can also use the `/opt/paessler/share/scripts` volume for the scripts of the [Script v2][prtgmanual:scriptv2] sensor.
|
||||
|
||||
[prtgmanual:scriptv2]: https://www.paessler.com/manuals/prtg/script_v2_sensor
|
||||
[TLS]: https://kb.paessler.com/en/topic/91877-how-can-i-create-a-tls-certificate
|
||||
[GID]: https://www.paessler.com/manuals/prtg/prtg_administration_tool_on_remote_probe_systems#:~:text=GID
|
||||
|
||||
```sh
|
||||
docker run -it \
|
||||
--network bridge \
|
||||
-v ./scripts:/opt/paessler/share/scripts:ro \
|
||||
-v ./config:/config \
|
||||
-v $(pwd)/scripts:/opt/paessler/share/scripts:ro \
|
||||
-v $(pwd)/config:/config \
|
||||
--cap-add NET_ADMIN \
|
||||
--cap-add NET_RAW \
|
||||
paessler/multi-platform-probe:latest
|
||||
|
||||
@@ -18,7 +18,7 @@ do
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ ! $_passthrough -eq 0 ] ; then
|
||||
if [ $_passthrough -ne 0 ] ; then
|
||||
exec gosu paessler_mpprobe:paessler_mpprobe \
|
||||
${PRTGMPPROBE__BINARY} \
|
||||
"$@"
|
||||
@@ -42,19 +42,29 @@ done
|
||||
|
||||
# Handling Env vars
|
||||
|
||||
# Get/Generate a probe id from PRTGMPPROBE__ID_FILE or from PRTGMPPROBE__ID
|
||||
if [ -z "${PRTGMPPROBE__ID-}" ] ; then
|
||||
if [ ! -f "${PRTGMPPROBE__ID_FILE}" ] ; then
|
||||
cat /proc/sys/kernel/random/uuid > ${PRTGMPPROBE__ID_FILE} || (
|
||||
error "Unable to write to ${PRTGMPPROBE__ID_FILE}. Please either set PRTGMPPROBE__ID in the container environment or make sure the location ${PRTGMPPROBE__ID_FILE} is writable."
|
||||
echo >&2 " "
|
||||
echo >&2 "Example:"
|
||||
echo >&2 "PRTGMPPROBE__ID=$(cat /proc/sys/kernel/random/uuid)"
|
||||
exit 1
|
||||
)
|
||||
if [ ! -f "${PRTGMPPROBE__CONFIG_FILE}" ] ; then
|
||||
error "Configuration file ${PRTGMPPROBE__CONFIG_FILE} does not exist. Please create one."
|
||||
echo >&2 " "
|
||||
echo >&2 "Example:"
|
||||
${PRTGMPPROBE__BINARY} example-config >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get/Generate a probe id from PRTGMPPROBE__ID_FILE or from PRTGMPPROBE__ID if not set in PRTGMPPROBE__CONFIG_FILE
|
||||
if ! grep -q "^id:" "${PRTGMPPROBE__CONFIG_FILE}" ; then
|
||||
if [ -z "${PRTGMPPROBE__ID-}" ] ; then
|
||||
if [ ! -f "${PRTGMPPROBE__ID_FILE}" ] ; then
|
||||
cat /proc/sys/kernel/random/uuid > ${PRTGMPPROBE__ID_FILE} || (
|
||||
error "Unable to write to ${PRTGMPPROBE__ID_FILE}. Please either set PRTGMPPROBE__ID in the container environment, 'id:' in the ${PRTGMPPROBE__CONFIG_FILE} or make sure the location ${PRTGMPPROBE__ID_FILE} is writable."
|
||||
echo >&2 " "
|
||||
echo >&2 "Example:"
|
||||
echo >&2 "PRTGMPPROBE__ID=$(cat /proc/sys/kernel/random/uuid)"
|
||||
exit 1
|
||||
)
|
||||
fi
|
||||
PRTGMPPROBE__ID=$(cat ${PRTGMPPROBE__ID_FILE})
|
||||
export PRTGMPPROBE__ID
|
||||
fi
|
||||
PRTGMPPROBE__ID=$(cat ${PRTGMPPROBE__ID_FILE})
|
||||
export PRTGMPPROBE__ID
|
||||
fi
|
||||
|
||||
export PRTGMPPROBE__NAME=${PRTGMPPROBE__NAME:-"multi-platform-probe@$(hostname)"}
|
||||
@@ -70,14 +80,6 @@ export PRTGMPPROBE__LOGGING__CONSOLE__WITHOUT_TIME=${PRTGMPPROBE__LOGGING__CONSO
|
||||
export PRTGMPPROBE__LOGGING__JOURNALD__LEVEL=${PRTGMPPROBE__LOGGING__JOURNALD__FIELD_PREFIX:-"off"}
|
||||
export PRTGMPPROBE__LOGGING__JOURNALD__FIELD_PREFIX=${PRTGMPPROBE__LOGGING__JOURNALD__FIELD_PREFIX:-"PRTGMPPROBE"}
|
||||
|
||||
if [ ! -f "${PRTGMPPROBE__CONFIG_FILE}" ] ; then
|
||||
error "Configuration file ${PRTGMPPROBE__CONFIG_FILE} does not exist. Please create one."
|
||||
echo >&2 " "
|
||||
echo >&2 "Example:"
|
||||
${PRTGMPPROBE__BINARY} example-config >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
env | grep PRTGMPPROBE__ >&2
|
||||
|
||||
# add capabilities for icmp to the probe executable
|
||||
|
||||
Reference in New Issue
Block a user