-
Notifications
You must be signed in to change notification settings - Fork 158
/
mysql.discovery.yaml
31 lines (31 loc) · 1.47 KB
/
mysql.discovery.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#####################################################################################
# Do not edit manually! #
# All changes must be made to associated .tmpl file before running 'make bundle.d'. #
#####################################################################################
mysql:
enabled: true
rule:
docker_observer: type == "container" and port != 33060 and any([name, image, command], {# matches "(?i)mysql"}) and not (command matches "splunk.discovery")
host_observer: type == "hostport" and port != 33060 and command matches "(?i)mysqld"
k8s_observer: type == "port" and port != 33060 and pod.name matches "(?i)mysql"
config:
default:
username: splunk.discovery.default
password: splunk.discovery.default
status:
metrics:
- status: successful
strict: mysql.locks
message: Mysql receiver is working!
statements:
- status: failed
regexp: "Can't connect to MySQL server on .* [(]111[)]"
message: The container cannot be reached by the Collector. The container is refusing MySQL connections.
- status: partial
regexp: 'Access denied for user'
message: |-
Make sure your user credentials are correctly specified as environment variables.
```
SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_username="<username>"
SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_password="<password>"
```