-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add node-observ-lib #25
Conversation
7577cf2
to
8649f29
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Couple nits/comments.
{ | ||
hide: true, | ||
iconColor: 'light-purple', | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you use commonlib.annotations.fatal.new
instead? These values are implied there 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, it is not fatal event. So maybe it is best to change color instead :)
docs/node-observ-lib/main.libsonnet
Outdated
): { | ||
|
||
local this = self, | ||
config: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we decide and document somewhere that config should go in the main definition of the mixin?
We have an existing pattern of looking for an external config.libsonnet
file to change configurable options, so this could be confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, there was no decision if config should be inline or in separate file. I'll see what I can do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to refactor it. New() is now parameterless, and all config is moved to config.libsonnet file. Some sane defaults are provided for all params required in modular libs. And any of those defaults can be modified by calling it like this:
local nodelib = import './main.libsonnet';
local linux =
nodelib.new()
+ nodelib.withConfigMixin({
filteringSelector: 'job=~".*node.*"',
groupLabels: ['job'],
instanceLabels: ['instance'],
dashboardNamePrefix: 'Node exporter / ',
dashboardTags: ['node-exporter-mixin'],
uid: 'node',
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me! Makes the config a bit more modular and clear where the changeable parameters are.
I like the withConfigMixin
function too, allowing the user to easily supply their own config overrides.
This makes sense to me, I'd be curious if the rest of the team has any feedback. @Dasomeone @gaantunes ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for missing this ping (and the PR, will review that as well)
I really like the solution you've come up with here, with config separate by default but a function to supply in-line should it be desired. Quite happy to go forward with what the two of you have already done :D
Just a comment here, based on the description:
Is there a list of the incompatibilities? Is it just the two listed for macos and USE dashboards? Are we tracking that in the issue or separate issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks amazing @v-zhuravlev, very well organized and easy to customize.
I also love that even though it is a lot of jsonnet code, it is easy to understand what is happening. Our previous approach of putting everything in just a few files was hard to grok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple very minor nitpicks but generally looks fantastic, great work Vitaly!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpicks throughout: I don't mind shortening observability
to observ
for the folder name, but it feels pretty awkward everywhere else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good one, updated readme
|
||
local linux = | ||
nodelib.new() | ||
+ nodelib.withConfigMixin({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should add a little explanation/example with separate configuration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
yes, those are major ones. Also some config params are dropped, like clusterLabel... |
* Add node-observ-lib * Remove trends support (not in 10.0 schema) * Make filteringSelector for logs dashboard configurable * Temp change dependency (until PR is merged for commonlib) * Refactor config * Update jsonnetfile.json * Update README * Add separate loki example * Add sep file example Signed-off-by: Vitaly Zhuravlev <[email protected]>
* Add node-observ-lib * Remove trends support (not in 10.0 schema) * Make filteringSelector for logs dashboard configurable * Temp change dependency (until PR is merged for commonlib) * Refactor config * Update jsonnetfile.json * Update README * Add separate loki example * Add sep file example Signed-off-by: Vitaly Zhuravlev <[email protected]>
Similar to windows-observ-lib, node-observ-lib is created, using many panels from commonlib:. It also refactors everything from node-mixin by using grafonnet (v10 schema).
Node observ lib would allow:
Uid
andfilteringSelector
are used to avoid conflicts).Due to current incompatibility with old mixin, lib is created in a separate folder.
What is not implemented (yet?):
What is recreated/moved from old node-mixin:
Added: