diff --git a/docs/30_Usage.md b/docs/30_Usage.md index 7f4d885fd608d42632cf9ac0e8be7618fadaa1cd..b3ced142c9eafa7cab3d3560050c7fb6d2d14d05 100644 --- a/docs/30_Usage.md +++ b/docs/30_Usage.md @@ -86,9 +86,14 @@ slack[]='{ "#support-channel": "https://hooks.slack.com/services/XXXXXX/YYYYYY/Z ["hello plugin"] description="I sust wann say hello" function="hello" -params='{ -"message": "Here I am" -}' + +; JSON example ... variables cannot be expanded +; params='{ +; "message": "Here I am" +; }' +; +; ... but in double quotes the expansion works +params[message]="Here is ${USER}" ; ----------------------------------------------------------------------- ``` @@ -109,16 +114,12 @@ The binary uses the php function `parse_ini_file` - see <https://www.php.net/man * numbers of integer, float (no quoting) * strings in single quotes or double quotes - * Specialties: We use JSON syntax in these ini variables to parse - * [notifications] -> slack - * [check] -> params - * Environment variables or PHP configuration values can be embedded using `${<VARMAME>}`; it works with unquoted value or double quoted strings but not inside single quotes. - -In the example above see the value behind `params=`. It is aquoted string using single quotes `'`. The JSON key and value must be quoted with double quotes. + * Specialty: In [check] -> params you can use JSON syntax: It is aquoted string using single quotes `'`. The JSON key and value must be quoted with double quotes. + * Environment variables or PHP configuration values can be embedded using `${<VARMAME>}`; it works with unquoted value or double quoted strings but not inside single quotes (or JSON). The values for each check are check specific. Have a look to the origin docs for each check - see <https://os-docs.iml.unibe.ch/appmonitor/PHP_client/Plugins/Checks/index.html>. -To have a minimal working example have a the folder `tests/configs` or here <https://git-repo.iml.unibe.ch/iml-open-source/appmonitor-cli-client/-/tree/main/tests/configs?>. But here are not all supported keys. +To have a minimal working example have a the folder `tests/configs` or here <https://git-repo.iml.unibe.ch/iml-open-source/appmonitor-cli-client/-/tree/main/tests/configs?>. These ini files do NOT contain all supported keys. ## Exitcodes