Skip to content

Commit

Permalink
Add separate loki example
Browse files Browse the repository at this point in the history
  • Loading branch information
v-zhuravlev committed Nov 14, 2023
1 parent 016bfac commit 0e78ebf
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions docs/node-observ-lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,31 @@ local linux =
dashboardNamePrefix: 'Node exporter / ',
dashboardTags: ['node-exporter-mixin'],
uid: 'node',
})
+ nodelib.withConfigMixin(
{
// enable loki logs
enableLokiLogs: true,
}
);
// enable loki logs
enableLokiLogs: true,
});
{
grafanaDashboards+:: linux.grafana.dashboards,
prometheusAlerts+:: linux.prometheus.alerts,
prometheusRules+:: linux.prometheus.recordingRules,
}
```

### Example 2: Fill in monitoring-mixin with default config values and enable loki logs:

You can use observ-lib to fill in monitoring-mixin structure:

```jsonnet
// mixin.libsonnet file
local nodelib = import 'node-observ-lib/main.libsonnet';
local linux =
nodelib.new()
+ nodelib.withConfigMixin({
enableLokiLogs: true,
});
{
grafanaDashboards+:: linux.grafana.dashboards,
Expand All @@ -44,7 +62,7 @@ local linux =
```

### Example 2: Modify specific panel before rendering dashboards
### Example 3: Modify specific panel before rendering dashboards

```jsonnet
local g = import './g.libsonnet';
Expand Down

0 comments on commit 0e78ebf

Please sign in to comment.