Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation📄: Monitoring Page #180

Open
Sukriti-sood opened this issue Feb 27, 2022 · 10 comments
Open

Documentation📄: Monitoring Page #180

Sukriti-sood opened this issue Feb 27, 2022 · 10 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed question Further information is requested

Comments

@Sukriti-sood
Copy link
Member

Sukriti-sood commented Feb 27, 2022

What is the current documentation state?

Currently documentation of Monitoring is empty.
Edit this page.

@Sukriti-sood Sukriti-sood added the documentation Improvements or additions to documentation label Feb 27, 2022
@Abhijay007
Copy link
Contributor

CC @joewxboy

@joewxboy
Copy link
Member

joewxboy commented Mar 4, 2022

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
Copy link
Member

joewxboy commented Mar 4, 2022

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

@joewxboy joewxboy added help wanted Extra attention is needed question Further information is requested labels Mar 4, 2022
@Sukriti-sood
Copy link
Member Author

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.

@johnwalicki
Copy link
Member

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
Copy link
Member

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
Copy link
Member

johnwalicki commented Jun 20, 2022

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
Copy link
Member

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.

@joewxboy
Copy link
Member

@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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed question Further information is requested
Projects
Status: Documentation
Development

No branches or pull requests

5 participants