Forum
Please or Register to create posts and topics.

How to print the health status section that appears on http to a txt file?

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.

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:
mrhandsome has reacted to this post.
mrhandsome

Thank you so much. Its works.

Quote from mm_dev on 23/05/2024, 14:00

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.

 

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.

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).

mrhandsome has reacted to this post.
mrhandsome