diff --git a/director-cli.sh b/director-cli.sh index cf8f0ee2963f2574dba21926461cf306beb78e25..1717b9ead44151607df3378e7c056894c0360b81 100755 --- a/director-cli.sh +++ b/director-cli.sh @@ -14,21 +14,22 @@ # # ---------------------------------------------------------------------- # ah = axel.hahn@unibe.ch -# 2022-02-16 v0.2 ah add --cfg param -# 2022-03-04 v0.3 ah abort on http 5xx error -# 2023-01-22 v0.4 ah fix _bStopOnError; some shellfixes -# 2023-02-17 v0.5 ah add hostnamme into CFGSTORAGE -# 2023-02-17 v0.6 ah remove invalid line in cleanup -# 2023-02-17 v0.7 ah check inc_getconfig.sh exists and hostname -f has a value -# 2023-10-25 v0.8 ah generate json with "jo"; optimze http requests on services; parallel service function call -# 2023-11-02 v0.9 ah fix json genration for multiple ports -# 2023-11-03 v0.10 ah fix json key for service link -# 2024-03-26 v0.11 ah on service creation: use http status code instead of exitcode -# 2024-04-09 v0.12 ah add host_notes_url on host +# 2022-02-16 v0.2 ah add --cfg param +# 2022-03-04 v0.3 ah abort on http 5xx error +# 2023-01-22 v0.4 ah fix _bStopOnError; some shellfixes +# 2023-02-17 v0.5 ah add hostnamme into CFGSTORAGE +# 2023-02-17 v0.6 ah remove invalid line in cleanup +# 2023-02-17 v0.7 ah check inc_getconfig.sh exists and hostname -f has a value +# 2023-10-25 v0.8 ah generate json with "jo"; optimze http requests on services; parallel service function call +# 2023-11-02 v0.9 ah fix json genration for multiple ports +# 2023-11-03 v0.10 ah fix json key for service link +# 2024-03-26 v0.11 ah on service creation: use http status code instead of exitcode +# 2024-04-09 v0.12 ah add host_notes_url on host +# 2024-11-20 v0.13 ah update rest api client; show --hs param in the help # ====================================================================== -_version="0.12" +_version="0.13" which curl >/dev/null || exit 1 which jo >/dev/null || exit 1 @@ -664,6 +665,9 @@ Host actions --hostdelete Delete [$MY_NAME] in the icinga director + --hs + --hostshow + Show generated JSON for cur current host what should be sent Check actions @@ -743,7 +747,7 @@ else . "$_cfg" fi . $(dirname $0)/inc_functions.sh -. $(dirname $0)/inc/rest-api-client.sh +. $(dirname $0)/inc/http.class.sh if [ $# -eq 0 ]; then