From 65e0f390455e78dcaa1efc5a02ee493a2b468e25 Mon Sep 17 00:00:00 2001 From: dmd2222 Date: Fri, 4 Dec 2020 01:38:55 +0100 Subject: [PATCH] I did it https://github.com/dmd2222 on 04.12.2020 at 1:38:55,67 --- api/external_ping_api/0.1/README | 28 +++++++++++++++++++++ api/external_ping_api/0.1/config.php | 1 + api/external_ping_api/0.1/config_sample.php | 2 +- api/external_ping_api/0.1/data/test.txt | 1 - api/external_ping_api/0.1/data/test1.txt | 1 + api/external_ping_api/0.1/gitignore | 1 + 6 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 api/external_ping_api/0.1/config.php delete mode 100644 api/external_ping_api/0.1/data/test.txt create mode 100644 api/external_ping_api/0.1/data/test1.txt create mode 100644 api/external_ping_api/0.1/gitignore diff --git a/api/external_ping_api/0.1/README b/api/external_ping_api/0.1/README index 7e9ae590..2678e8c8 100644 --- a/api/external_ping_api/0.1/README +++ b/api/external_ping_api/0.1/README @@ -1,4 +1,32 @@ README / Instruction: +Now you can write an externat application, tiggering an update +in the server monitor. +External application -> calls api -> phpservermom can monitor the api. + +Installation: +1: Take config_sample.php and set your configuration. +2: Safe it as config.php. +3: Ready to use. + + +Set up new monitoring: +1: Set external application calling the https://yourdomain.com/phpservermon/api/external_ping_api/0.1/index.php?i=set&iv=<>&key=<> +url. (setname = give the call a name. yourkey = after the first call of the script you find the key in the file key.config.) + +SAMPLE: http://127.0.0.1/phpservermon/api/external_ping_api/0.1/index.php?i=get&iv=testapp1&key=WTn9cYxz5PWadaVqEdki0FwhmLkjje5RXgDVTAlWdq3Uvv5hR1i0TI1AFN7Z + +2: Go to: http://127.0.0.1/phpservermon/?&mod=server&action=edit and add a new server monitoring. +Label = Your name (may your setname, step 1) +Domain/IP = SAMPLE: http://127.0.0.1/phpservermon/api/external_ping_api/0.1/index.php?i=get&iv=testapp1&key=WTn9cYxz5PWadaVqEdki0FwhmLkjje5RXgDVTAlWdq3Uvv5hR1i0TI1AFN7Z +Type = Website +Search string/pattern = "Last update" + +3: Test it and enjoy it. + + + + +Best regards M.S. \ No newline at end of file diff --git a/api/external_ping_api/0.1/config.php b/api/external_ping_api/0.1/config.php new file mode 100644 index 00000000..8318c86b --- /dev/null +++ b/api/external_ping_api/0.1/config.php @@ -0,0 +1 @@ +Test \ No newline at end of file diff --git a/api/external_ping_api/0.1/config_sample.php b/api/external_ping_api/0.1/config_sample.php index 9de007e9..4b76976a 100644 --- a/api/external_ping_api/0.1/config_sample.php +++ b/api/external_ping_api/0.1/config_sample.php @@ -6,7 +6,7 @@ $is_active=true; // index.php config //definition when will ping be old, in seconds -$old_time_definition = 60; +$old_time_definition = 15; $create_non_exsisting_files=true; //keyit.php config diff --git a/api/external_ping_api/0.1/data/test.txt b/api/external_ping_api/0.1/data/test.txt deleted file mode 100644 index 47ecedde..00000000 --- a/api/external_ping_api/0.1/data/test.txt +++ /dev/null @@ -1 +0,0 @@ -1607040433 \ No newline at end of file diff --git a/api/external_ping_api/0.1/data/test1.txt b/api/external_ping_api/0.1/data/test1.txt new file mode 100644 index 00000000..33d92310 --- /dev/null +++ b/api/external_ping_api/0.1/data/test1.txt @@ -0,0 +1 @@ +1607042212 \ No newline at end of file diff --git a/api/external_ping_api/0.1/gitignore b/api/external_ping_api/0.1/gitignore new file mode 100644 index 00000000..4e9b47a3 --- /dev/null +++ b/api/external_ping_api/0.1/gitignore @@ -0,0 +1 @@ +config.php \ No newline at end of file