-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MySQL integration. Metrics only so far.
Signed-off-by: Pete Wall <pete.wall@grafana.com>
- Loading branch information
Showing
36 changed files
with
1,193 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# mysql | ||
|
||
## Values | ||
|
||
### Discovery Settings | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| labelSelectors | object | `{}` | Discover MySQL Exporter instances based on label selectors, if not using the exporter | | ||
|
||
### Metric Processing Settings | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| maxCacheSize | string | `100000` | Sets the max_cache_size for prometheus.relabel component. This should be at least 2x-5x your largest scrape target or samples appended rate. ([docs](https://grafana.com/docs/alloy/latest/reference/components/prometheus.relabel/#arguments)) Overrides global.maxCacheSize | | ||
| metricsTuning.excludeMetrics | list | `[]` | Metrics to drop. Can use regular expressions. | | ||
| metricsTuning.includeMetrics | list | `[]` | Metrics to keep. Can use regular expressions. | | ||
|
||
### General Settings | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| name | string | `""` | Name for this MySQL instance. | | ||
|
||
### Scrape Settings | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| scrapeInterval | string | `60s` | How frequently to scrape metrics from MySQL Exporter. | | ||
|
||
### Other Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| exporter.collectors[0] | string | `"heartbeat"` | | | ||
| exporter.collectors[1] | string | `"mysql.user"` | | | ||
| exporter.dataSource.host | string | `""` | | | ||
| exporter.dataSource.password | string | `""` | | | ||
| exporter.dataSource.port | int | `3306` | | | ||
| exporter.dataSource.username | string | `""` | | | ||
| exporter.dataSourceName | string | `""` | | | ||
| exporter.enabled | bool | `true` | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
charts/feature-integrations/integrations/mysql-values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
# -- Name for this MySQL instance. | ||
# @section -- General Settings | ||
name: "" | ||
|
||
exporter: | ||
enabled: true | ||
|
||
# TODO: Utilize the secret functions to use from | ||
dataSourceName: "" | ||
dataSource: | ||
host: "" | ||
port: 3306 | ||
auth: | ||
username: "" | ||
usernameKey: "" | ||
usernameFrom: "" | ||
password: "" | ||
passwordKey: "" | ||
passwordFrom: "" | ||
|
||
secret: | ||
# -- (bool) Whether to create a secret for this MySQL integration instance. | ||
# @default -- `true` | ||
# @section -- Secret | ||
create: | ||
# -- If true, skip secret creation and embed the credentials directly into the configuration. | ||
# @section -- Secret | ||
embed: false | ||
# -- The name of the secret to create. | ||
# @section -- Secret | ||
name: "" | ||
# -- The namespace for the secret. | ||
# @section -- Secret | ||
namespace: "" | ||
|
||
collectors: | ||
- heartbeat | ||
- mysql.user | ||
|
||
# -- Discover MySQL Exporter instances based on label selectors, if not using the exporter | ||
# @section -- Discovery Settings | ||
labelSelectors: {} | ||
|
||
# -- How frequently to scrape metrics from MySQL Exporter. | ||
# @default -- `60s` | ||
# @section -- Scrape Settings | ||
scrapeInterval: | ||
|
||
# Adjustments to the scraped metrics to filter the amount of data sent to storage. | ||
metricsTuning: | ||
# -- Metrics to keep. Can use regular expressions. | ||
# @section -- Metric Processing Settings | ||
includeMetrics: [] | ||
# -- Metrics to drop. Can use regular expressions. | ||
# @section -- Metric Processing Settings | ||
excludeMetrics: [] | ||
|
||
# -- Sets the max_cache_size for prometheus.relabel component. | ||
# This should be at least 2x-5x your largest scrape target or samples appended rate. | ||
# ([docs](https://grafana.com/docs/alloy/latest/reference/components/prometheus.relabel/#arguments)) | ||
# Overrides global.maxCacheSize | ||
# @default -- `100000` | ||
# @section -- Metric Processing Settings | ||
maxCacheSize: |
66 changes: 66 additions & 0 deletions
66
charts/feature-integrations/schema-mods/definitions/mysql-integration.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"exporter": { | ||
"type": "object", | ||
"properties": { | ||
"collectors": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"dataSource": { | ||
"type": "object", | ||
"properties": { | ||
"host": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"port": { | ||
"type": "integer" | ||
}, | ||
"username": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"dataSourceName": { | ||
"type": "string" | ||
}, | ||
"enabled": { | ||
"type": "boolean" | ||
} | ||
} | ||
}, | ||
"labelSelectors": { | ||
"type": "object" | ||
}, | ||
"maxCacheSize": { | ||
"type": "null" | ||
}, | ||
"metricsTuning": { | ||
"type": "object", | ||
"properties": { | ||
"excludeMetrics": { | ||
"type": "array" | ||
}, | ||
"includeMetrics": { | ||
"type": "array" | ||
} | ||
} | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"scrapeInterval": { | ||
"type": "null" | ||
}, | ||
"type": { | ||
"type": "string", | ||
"const": "mysql" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.