summaryrefslogtreecommitdiffstats
path: root/docs/aoa/amps.rst
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2022-04-10 15:50:39 +0200
committernicolargo <nicolas@nicolargo.com>2022-04-10 15:50:39 +0200
commit7003028f9ebc4772402d9ce5ec37708d730a595f (patch)
tree185c535b105f27a5d8e04d3b23981d7169dc8e6d /docs/aoa/amps.rst
parent320a1ffcae267ab55b7c5c17882f4b357b8a1525 (diff)
Amp with pipe do not work #1976
Diffstat (limited to 'docs/aoa/amps.rst')
-rw-r--r--docs/aoa/amps.rst22
1 files changed, 21 insertions, 1 deletions
diff --git a/docs/aoa/amps.rst b/docs/aoa/amps.rst
index 5de564ab..f6ead33b 100644
--- a/docs/aoa/amps.rst
+++ b/docs/aoa/amps.rst
@@ -50,7 +50,7 @@ less than countmin):
.. image:: ../_static/amp-python-warning.png
If the regex option is not defined, the AMP will be executed every refresh
-time and the process count will not be displayed (countmin and countmax will
+time and the process count will not be displayed (countmin and countmax will
be ignored).
For example:
@@ -63,6 +63,26 @@ For example:
one_line=false
command=sysctl net.netfilter.nf_conntrack_count;sysctl net.netfilter.nf_conntrack_max
+For security reason, pipe is not directly allowed in a AMP command but you create a sheel
+script with your command:
+
+.. code-block:: ini
+
+ $ cat /usr/local/bin/mycommand.sh
+ #!/bin/sh
+ ps -aux | wc -l
+
+and use it in the amps:
+
+.. code-block:: ini
+
+ [amp_amptest]
+ enable=true
+ regex=.*
+ refresh=15
+ one_line=false
+ command=/usr/local/bin/mycommand.sh
+
User defined AMP
----------------