# Elastic Observability Lab 2.2 Error

**URL:** <https://discuss.elastic.co/t/elastic-observability-lab-2-2-error/338035>\
**Category:** Elastic Training\
**Created:** [July 10, 2023, 3:37pm UTC](https://discuss.elastic.co/t/elastic-observability-lab-2-2-error/338035 "2023-07-10T15:37:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AmitKakkad](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@AmitKakkad](https://discuss.elastic.co/u/AmitKakkad)\
**Post date:** [July 10, 2023, 3:37pm UTC](https://discuss.elastic.co/t/elastic-observability-lab-2-2-error/338035/1 "2023-07-10T15:37:30Z")

</div>

Course: Elastic Observability Engineer 7.9 (On-Demand)  
Version: \<And which particular version?\>  
Question: Elastic Observability Lab 2.2 Error

Hello. I have this in the myql yaml:

Module: mysql  
Docs: MySQL module | Metricbeat Reference [7.9] | Elastic  
module: mysql  
metricsets:

status

- galera\_status
- performance
- query  
period: 10s

Host DSN should be defined as "user:pass@tcp(127.0.0.1:3306)/"  
or "unix(/var/lib/mysql/mysql.sock)/",  
or another DSN format supported by [GitHub - go-sql-driver/mysql: Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package](https://github.com/Go-SQL-Driver/MySQL/).  
The username and password can either be set in the DSN or using the username  
and password config options. Those specified in the DSN take precedence.  
#hosts: ["root:secret@tcp(127.0.0.1:3306)/"]  
hosts: ["root:petclinic@tcp(mysql:3306)/"]

Username of hosts. Empty by default.  
username: root

Password of hosts. Empty by default.  
#password: secret  
password: petclinic

But I get this error when testing:

[elastic@mysql metricbeat]$ ./metricbeat test modules mysql  
Error getting metricbeat modules: error loading config files: invalid config: yaml: line 17: did not find expected '-' indicator

Can anyone help please?

I have looked at the processes also:

elastic@mysql metricbeat]$ ps -eaf  
UID PID PPID C STIME TTY TIME CMD  
root 1 0 0 13:43 pts/0 00:00:00 /bin/bash /root/startup.sh  
root 11 1 0 13:43 ? 00:00:00 /usr/bin/python /usr/bin/supervisord -c /etc/supervisor/supervisord.conf  
root 18 1 0 13:43 ? 00:00:00 /usr/bin/python /usr/bin/supervisord -c /etc/supervisor/supervisord.conf  
mysql 36 1 0 13:43 pts/0 00:00:11 mysqld --init-file=/tmp/init.sql  
root 38 1 0 13:43 pts/0 00:00:00 /bin/bash /root/start-scripts/99-bash.sh  
root 39 38 0 13:43 pts/0 00:00:00 bash -l  
root 86 1 0 13:43 ? 00:00:00 /sbin/sshd  
root 330 86 0 14:05 ? 00:00:00 sshd: elastic [priv]  
elastic 332 330 0 14:05 ? 00:00:00 sshd: elastic@pts/1  
elastic 333 332 0 14:05 pts/1 00:00:00 -bash  
elastic 1192 333 0 15:02 pts/1 00:00:00 ps -eaf

Seem ok to me.

Regards,

Amit

 ![Lab 22-a](https://us1.discourse-cdn.com/elastic/original/3X/2/4/24627eabd46f7f039ba94d87d7ad1e125d5473f1.jpeg)

---

<div class="post-metadata">

**Author:** ![AmitKakkad](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@AmitKakkad](https://discuss.elastic.co/u/AmitKakkad)\
**Post date:** [July 10, 2023, 4:36pm UTC](https://discuss.elastic.co/t/elastic-observability-lab-2-2-error/338035/2 "2023-07-10T16:36:46Z")

</div>

I uncommented "Module: mysql" at the top of the yaml file and it worked.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 9, 2023, 4:37pm UTC](https://discuss.elastic.co/t/elastic-observability-lab-2-2-error/338035/3 "2023-08-09T16:37:13Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
