diff --git a/TODO.md b/TODO.md index e11d23f9d197a6fcd6d049f842b4a2b47b2d84fa..a7ed9a33d5f923c98b2c6f16971ed0d3519a0345 100644 --- a/TODO.md +++ b/TODO.md @@ -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 -⬜ 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 @@ -55,6 +55,8 @@ was ich so sehe ... --- Legende: -⬜ -✅ -❌ +⬜ TODO + +✅ DONE + +❌ failed diff --git a/Usage.md b/Usage.md deleted file mode 100644 index 5ba700472e53e8f6d19a1e6d33122bc7b471e13c..0000000000000000000000000000000000000000 --- a/Usage.md +++ /dev/null @@ -1,70 +0,0 @@ -# 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 - diff --git a/docs/30_Usage.md b/docs/30_Usage.md index efadb8770c1b6efdb066e0fa00788d5dfbce55bc..e619cf4efea1f762bbd94078f2b606b3c4d3f56b 100644 --- a/docs/30_Usage.md +++ b/docs/30_Usage.md @@ -2,30 +2,51 @@ ```text ./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. -You can use the compiled binary on non PHP systems. -(c) 2025 Institute for Medical education * University of Bern +It contains all checks that are available in the PHP appmonitor client. +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 -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, --verbose Enable verbose output (written to STDERR) -V, --version Show version and exit -EXAMPLES: + +👉 EXAMPLES: amcli -i=my.ini amcli --ini=my.ini Execute checks from INI file 'my.ini'. amcli --list - List available checks. + List available checks. ``` diff --git a/docs/images/screesnhot_test_php_modules.png b/docs/images/screenshot_test_php_modules.png similarity index 100% rename from docs/images/screesnhot_test_php_modules.png rename to docs/images/screenshot_test_php_modules.png diff --git a/readme.md b/readme.md index 9eb11c329159638daceea49e2cd71e32b30e2ae2..45371b145f36ee235c5bdfd386284c5c17bff72a 100644 --- a/readme.md +++ b/readme.md @@ -11,4 +11,4 @@ The binary has parameter support. It parses an ini file that containes metadata and all checks. - \ No newline at end of file +