open-horizon.github.io
                                
                                 open-horizon.github.io copied to clipboard
                                
                                    open-horizon.github.io copied to clipboard
                            
                            
                            
                        Documentationđź“„: Monitoring Page
What is the current documentation state?
Currently documentation of Monitoring is empty. Edit this page.
CC @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.
And @Sukriti-sood there's no reason why you cannot learn this alongside Abhijay, if you wish.
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.
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]"
}
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.
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}
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 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.
The monitoring page is now at https://open-horizon.github.io/docs/admin/monitoring/ but still blank.