How to print the health status section that appears on http to a txt file?
Quote from mrhandsome on 23/05/2024, 13:25Hello Community,
I want to actively print the health status in the http healthstatus section in txt. I connected the http server stream part to the filewriter stream part, but it did not work. Apart from getting it from http, Can i also get the data directly from the health monitor?
Thanks.
Hello Community,
I want to actively print the health status in the http healthstatus section in txt. I connected the http server stream part to the filewriter stream part, but it did not work. Apart from getting it from http, Can i also get the data directly from the health monitor?
Thanks.
Quote from mm_dev on 23/05/2024, 14:00Health status is communicated via graph messages, not with the actual payload packets. Attached mission shows how to access it via script block.
However note that not every block implements the health status interface.
Health status is communicated via graph messages, not with the actual payload packets. Attached mission shows how to access it via script block.
However note that not every block implements the health status interface.
Uploaded files:
Quote from mrhandsome on 23/05/2024, 14:41Thank you so much. Its works.
Thank you so much. Its works.
Quote from mrhandsome on 23/05/2024, 15:32Quote from mm_dev on 23/05/2024, 14:00Health status is communicated via graph messages, not with the actual payload packets. Attached mission shows how to access it via script block.
However note that not every block implements the health status interface.
Thank you for answer. Sorry but I have one more question. I want to run this script as a loop. I tried using control sequencer but I couldn't run the script.
Quote from mm_dev on 23/05/2024, 14:00Health status is communicated via graph messages, not with the actual payload packets. Attached mission shows how to access it via script block.
However note that not every block implements the health status interface.
Thank you for answer. Sorry but I have one more question. I want to run this script as a loop. I tried using control sequencer but I couldn't run the script.
Quote from mm_dev on 23/05/2024, 15:51The example is specifically kept to a minimum and will only execute once when the interpreter is started. The easiest option for running it continously is probably to use a timer to send the REQUEST_HEALTH_STATUS message, e.g. replacing
Mission.sendGraphMessage(request);
with
setInterval(() => Mission.sendGraphMessage(request), 1000);
to call it once per second (you really shouldn't call it more often than that).
The example is specifically kept to a minimum and will only execute once when the interpreter is started. The easiest option for running it continously is probably to use a timer to send the REQUEST_HEALTH_STATUS message, e.g. replacing
Mission.sendGraphMessage(request);
with
setInterval(() => Mission.sendGraphMessage(request), 1000);
to call it once per second (you really shouldn't call it more often than that).