-
Notifications
You must be signed in to change notification settings - Fork 147
/
mysql.discovery.yaml
36 lines (36 loc) · 1.75 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
32
33
34
35
36
#####################################################################################
# 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
log_record:
body: Mysql receiver is working!
statements:
- status: failed
regexp: "Can't connect to MySQL server on .* [(]111[)]"
log_record:
append_pattern: true
body: The container cannot be reached by the Collector. The container is refusing MySQL connections.
- status: partial
regexp: 'Access denied for user'
log_record:
append_pattern: true
body: >-
Make sure your user credentials are correctly specified using the
`--set splunk.discovery.receivers.mysql.config.username="<username>"` and
`--set splunk.discovery.receivers.mysql.config.password="<password>"` command or the
`SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_username="<username>"` and
`SPLUNK_DISCOVERY_RECEIVERS_mysql_CONFIG_password="<password>"` environment variables.