Skip to content
Snippets Groups Projects
Commit 4b06517a authored by Axel Hahn's avatar Axel Hahn
Browse files

update docs

parent ba31c8c3
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ was ich so sehe ... ...@@ -4,7 +4,7 @@ was ich so sehe ...
✅ handle non-JSON Response (z.B. Syntaxfehler in der INI) --> Festlegen, was die aufrufende Instanz machen soll --> Client v0.154 sendet nun exitcode <>0 bei Fehler ✅ handle non-JSON Response (z.B. Syntaxfehler in der INI) --> Festlegen, was die aufrufende Instanz machen soll --> Client v0.154 sendet nun exitcode <>0 bei Fehler
optional: dynamische Parameter aus Umgebungsvariablen / Parsing aus Configs (was immer geht: INI per hooks/template/ file generieren.) optional: dynamische Parameter aus Umgebungsvariablen / Parsing aus Configs (was immer geht: INI per hooks/template/ file generieren.)
⬜ Dokumentation ⬜ Dokumentation
...@@ -55,6 +55,8 @@ was ich so sehe ... ...@@ -55,6 +55,8 @@ was ich so sehe ...
--- ---
Legende: Legende:
⬜ TODO
✅ DONE
❌ failed
# Usage of amcli
## Show help
```text
./src/amcli -h
IML Appmonitor as CLI client 0.1
This client performs appmonitor checks and puts the results as JSON to stdout.
You can use the compiled binary on non PHP systems.
(c) 2025 Institute for Medical education * University of Bern
SYNTAX: amcli [OPTIONS] --ini=<INI-FILE>
OPTIONS:
-h, --help Print this help and exit
-i, --ini Set an INI File to parse
-l, --list list available checks and exit
-m, --modules list available Php modules in this binary and exit
-v, --verbose Enable verbose output
-V, --version Show version and exit
EXAMPLES:
amcli -i=my.ini
amcli --ini=my.ini
Execute checks from INI file 'my.ini'.
amcli --list
List available checks.
```
## Execute checks
`amcli --ini=<FILENAME>`
## Exitcodes
### amcli
| Exitcode | Description
| --- | ---
| 0 | OK. An option was executed (help, list modules or checks) or the check was executed successfully
| 1 | include include_checks.php failed (php file only)
| 2 | include_checks.php failed (php file only)
| 3 | INI file was not given. Or missing `=` char in `--ini=<FILE>`
| 4 | Given Ini file does not exist
| 5 | Given Ini file cannot be parsed
| 6 | Ini value `params=` is no JSON
### appmonitor-client.class.php
| Exitcode | Description
| --- | ---
| 10 | incomplete reponse data detected eg. no check, no result code
| 11 | Access denied: Ip restriction was set
| 12 | Access denied: No token or wrong token was given
### appmonitor-checks.class.php
| Exitcode | Description
| --- | ---
| 20 | Missing key in a given hash
| 21 | Mising value in a given hash
| 22 | Check not found. Check your `function`value
| 23 | Check didn't response a hash (=error in check)
| 24 | Check responded a too small hash (=error in check)
| 25 | The unit in a space value is unknown
...@@ -2,23 +2,44 @@ ...@@ -2,23 +2,44 @@
```text ```text
./amcli -h ./amcli -h
IML Appmonitor as CLI client 0.2
IML Appmonitor as CLI client 0.4
This client performs appmonitor checks and puts the results as JSON to stdout. This client performs appmonitor checks and puts the results as JSON to stdout.
You can use the compiled binary on non PHP systems. It contains all checks that are available in the PHP appmonitor client.
(c) 2025 Institute for Medical education * University of Bern You can use the compiled binary to monitor any non PHP webapp without
implementing the checks for your programming language.
You need to reference an INI file that contains the metadata and all checks.
Have a look to the online documentation for details.
You find example snippets in the source code of this project in tests/config/.
👤 Author: Axel Hahn
📄 Source: https://git-repo.iml.unibe.ch/iml-open-source/appmonitor-cli-client
📜 License: GNU GPL 3.0
📗 Docs: https://os-docs.iml.unibe.ch/appmonitor-cli-client/
(c) 2025 Institute for Medical Education * University of Bern
...............................................................................
SYNTAX: amcli [OPTIONS] --ini=<INI-FILE>
OPTIONS: ✨ SYNTAX:
amcli [OPTIONS] --ini=<INI-FILE>
🔷 OPTIONS:
-h, --help Print this help and exit -h, --help Print this help and exit
-i, --ini Set an INI File to parse -i, --ini Set an INI File to parse
-l, --list list available checks and exit -l, --list list available checks and exit
-m, --modules list available Php modules in this binary and exit -m, --modules list available Php modules in this binary and exit
-v, --verbose Enable verbose output -v, --verbose Enable verbose output (written to STDERR)
-V, --version Show version and exit -V, --version Show version and exit
EXAMPLES:
👉 EXAMPLES:
amcli -i=my.ini amcli -i=my.ini
amcli --ini=my.ini amcli --ini=my.ini
......
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
The binary has parameter support. It parses an ini file that containes metadata and all checks. The binary has parameter support. It parses an ini file that containes metadata and all checks.
![alt text](docs/images/screesnhot_test_php_modules.png) ![alt text](docs/images/screenshot_test_php_modules.png)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment