open-horizon.github.io icon indicating copy to clipboard operation
open-horizon.github.io copied to clipboard

Documentationđź“„: Monitoring Page

Open Sukriti-sood opened this issue 3 years ago • 10 comments

What is the current documentation state?

Currently documentation of Monitoring is empty. Edit this page.

Sukriti-sood avatar Feb 27 '22 00:02 Sukriti-sood

CC @joewxboy

Abhijay007 avatar Mar 04 '22 18:03 Abhijay007

This is a good example of missing content. One of our goals is to identify missing content and to create it.

In working on this issue, you will need to learn how to create technical documentation. This is something that I don't know how to do, but @Rene-Ch1 is the expert.

@Abhijay007 please discuss with Rene to determine when she's ready to begin instructing you on creation of technical documentation. If needed, let's first identify a Subject Matter Expert (SME) and have that person begin writing a project blog post that will form the core of the material you use to create the documentation.

joewxboy avatar Mar 04 '22 19:03 joewxboy

And @Sukriti-sood there's no reason why you cannot learn this alongside Abhijay, if you wish.

joewxboy avatar Mar 04 '22 19:03 joewxboy

This is a good example of missing content. One of our goals is to identify missing content and to create it.

In working on this issue, you will need to learn how to create technical documentation. This is something that I don't know how to do, but @Rene-Ch1 is the expert.

@Abhijay007 please discuss with Rene to determine when she's ready to begin instructing you on creation of technical documentation. If needed, let's first identify a Subject Matter Expert (SME) and have that person begin writing a project blog post that will form the core of the material you use to create the documentation.

Yes, I also found this page while, working on one of the issues.

Sukriti-sood avatar Mar 05 '22 23:03 Sukriti-sood

One of the differentiating features of the IBM Edge Application Manager product is the web mgmt console and its various dashboards. It also has an Grafana metrics dashboard - https://www.ibm.com/docs/en/eam/4.3?topic=administering-monitoring-edge-nodes-services

Open Horizon doesn't necessarily strive to do those things. However, the hzn CLI is quite powerful.

Sanjeev created this unix pipeline to show the last heartbeat of edge devices in a HZN_ORG. It might be worthy to add to the monitoring page? He's got a few other helpful tips.

hzn exchange node list -l | jq -r 'keys[] as $k | {user:(.[$k].owner | split("/")[1]), org:(.[$k].owner | split("/")[0]), node:.[$k].name, lastHeartbeat:(.[$k].lastHeartbeat ) }'

Which generates a list of json objects:

{
  "user": "john",
  "org": "poc",
  "node": "jetson-nano",
  "lastHeartbeat": "2022-06-20T03:15:06.427683Z[UTC]"
}

johnwalicki avatar Jun 20 '22 03:06 johnwalicki

Sanjeev's notes: If you are looking for quick and easy way to view your own edge nodes and their online status (by lastHeartbeat) then you can use this hzn command and little jq gymnastics . Set your HZN_ORG_ID and HZN_EXCHANGE_USER_AUTH and run the above.

johnwalicki avatar Jun 20 '22 03:06 johnwalicki

He wanted to use the above in some automation scripts so he converted the heartbeat date from ISO8601 to Epoch timestamps.

hzn exchange node list -l | jq -r 'keys[] as $k | {user:(.[$k].owner | split("/")[1]), org:(.[$k].owner | split("/")[0]), node:.[$k].name, lastHeartbeat:(.[$k].lastHeartbeat | split(".")[0] | strptime("%Y-%m-%dT%H:%M:%S") | mktime) }'

Here's a compact version of the above:

hzn exchange node list -l | jq -r 'keys[] as $k | {user:(.[$k].owner | split("/")[1]), org:(.[$k].owner | split("/")[0]), node:.[$k].name, lastHeartbeat:(.[$k].lastHeartbeat | split(".")[0] | strptime("%Y-%m-%dT%H:%M:%S") | mktime) }' | jq -c

Reports back:

{"user":"john","org":"poc","node":"jetson-nano","lastHeartbeat":1655700310}

johnwalicki avatar Jun 20 '22 03:06 johnwalicki

Anyway, since we have a blank monitoring page at https://open-horizon.github.io/docs/admin/monitoring.html I thought we could add some of these tips to list node details.

Much more sophisticated hzn exchange commands are possible if you have Hub admin privileges.

johnwalicki avatar Jun 20 '22 04:06 johnwalicki

@johnwalicki That's a great idea. We also need to begin providing monitoring for the LF Edge community lab instance, so we can test these out there.

joewxboy avatar Jun 20 '22 13:06 joewxboy

The monitoring page is now at https://open-horizon.github.io/docs/admin/monitoring/ but still blank.

joewxboy avatar Sep 26 '23 12:09 joewxboy