Make customizing chart context information simpler, consistent and collaborative #14107
Replies: 7 comments 15 replies
-
@shyamvalsan how about if you start be extending the existing metadata to what we might want to have. eg what would we need to add here: https://london.my-netdata.io/api/v1/chart?chart=system.cpu {
"id": "system.cpu",
"name": "system.cpu",
"type": "system",
"family": "cpu",
"context": "system.cpu",
"title": "Total CPU utilization (system.cpu)",
"priority": 100,
"plugin": "proc.plugin",
"module": "/proc/stat",
"units": "percentage",
"data_url": "/api/v1/data?chart=system.cpu",
"chart_type": "stacked",
"duration": 138995,
"first_entry": 1670364870,
"last_entry": 1670503864,
"update_every": 1,
"dimensions": {
"guest_nice": { "name": "guest_nice" },
"guest": { "name": "guest" },
"steal": { "name": "steal" },
"softirq": { "name": "softirq" },
"irq": { "name": "irq" },
"user": { "name": "user" },
"system": { "name": "system" },
"nice": { "name": "nice" },
"iowait": { "name": "iowait" }
},
"chart_variables": {
},
"green": null,
"red": null,
"alarms": {
"20min_steal_cpu": {
"id": 1650007870,
"status": "CLEAR",
"units": "%",
"update_every": 300
},
"10min_cpu_iowait": {
"id": 1650007869,
"status": "CLEAR",
"units": "%",
"update_every": 60
},
"10min_cpu_usage": {
"id": 1650007868,
"status": "CLEAR",
"units": "%",
"update_every": 60
}
},
"chart_labels": {
"_collect_plugin":"proc.plugin",
"_collect_module":"/proc/stat",
"_instance_family":"cpu"
}
} Then we would have a sort of end state goal that building on something we already have. And then from there we could try work backwards to see how we might then centrally define such a global master /charts type lookup in yaml somewhere central. I think if we can introduce as little new terms like I think all we really need is to extend whats in the chart json above in a few ways - like you are suggesting and then just define it globally in one place and move to that then being the central source of truth for it all. |
Beta Was this translation helpful? Give feedback.
-
@shyamvalsan can you make the full yaml for the |
Beta Was this translation helpful? Give feedback.
-
agreed with all said so far, the centralized place to keep chart properties definitions per context summary sections, default options, etc. makes total sense.
I think this has come in the past, to allow definitions per Space / War Room / User to be used on the Overview but we focused first on providing this on the custom dashboards first. |
Beta Was this translation helpful? Give feedback.
-
I think we should also consider the TOC sections here - I've updated the YAML description to include.
|
Beta Was this translation helpful? Give feedback.
-
Feedback from call with @cakrit @sashwathn @amalkov :
|
Beta Was this translation helpful? Give feedback.
-
More feedback based on feedback, discussions and research:
An updated version of the
Until FE has implemented the changes (section separator, multiple rows in summary, color coded thresholds, info box supporting markdown) the following fields will be ignored: |
Beta Was this translation helpful? Give feedback.
-
Objective
When creating a new collector or editing an existing one, I should be able to specify the below details per chart context in a single code location in a consistent, simple manner
group-by
the chart should useAVG, SUM, MIN or MAX
by defaultI should also be able to define what charts show up in the summary dashboard for a collector, and in what form and what order these charts should be visualized.
Problem(s)
On Netdata cloud to edit the context information (1) I need to edit
contexts.js
file in thenetdata/cloud-frontend
repo (This is a private repo and this file cannot be edited by the community)netdata/netdata
repo) I need to edit calleddashboard_info.js
but changes done here will have to be manually ported over to the previously mentionedcontexts.js
file in the netdata/cloud-frontend repoThe other details such as default group-by, aggregation function etc. cannot currently be modified by someone working on the collector.
group by database
by default) it is hardcoded in thecloud-frontend
private repo by the FE teamTo create summary dashboards for a collector (section) I need to edit the same
contexts.js
file in the privatenetdata/cloud-frontend
repo (Hence cannot be edited by the community, changes not propagated automatically to local dashboard etc.)Idea
contexts.yaml
, in thenetdata/netdata-cloud
public repo which is accessible to communityHere's a short example
And a more verbose example
summary.yaml
, dedicated to summary dashboards with a YAML definition per collectorThe
section
,row
,textbox
fields are for future proofing, we do not support these in Netdata today. But to do full page useful summary dashboards per section we need these three fields.section
defines a header where charts can be grouped together,row
defines how many rows there are per section and how many charts per row.textbox
allows us to create a helpful info box with hyperlinks or any other text.An example:
netdata/cloud-frontend
will always pull the latest version of the YAML when doing a build and use it to auto-generate thecontexts.js
fileThis will ensure that the problems mentioned above are solved, and there's a simple, consistent and collaborative way to do this.
Beta Was this translation helpful? Give feedback.
All reactions