Ad Widget

Collapse

Connecting mySQL and slave mysql monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Patryk01
    Junior Member
    • Oct 2022
    • 3

    #1

    Connecting mySQL and slave mysql monitoring

    Hi,

    I'm facing problems while trying to connect my DB into monitoring by my agent zabbix. According to doc. and tutorials after installing zabbix agent there should be a file under location /etc/zabbix/zabbix_agent.d/ with name "userparameter_mysql.conf".
    Unfortunately I'm missing this file on every server because mentioned directory is empty. Does anyone know the solution?

    Main goal is to edit parameters in this file, create new user with privilege's on mysql data base and connect it by creating file "my.cnf" as a credential authentication.

    Later on goal is to monitor second DB and track if they're getting replicated correctly. By also editing "userparemeter_mysql.conf" by adding line:

    "UserParameter=mysql.slavestatus[*],echo “show slave status \G;” | HOME=”Path of credentials” mysql | grep ‘$1’ | awk ‘{print $$2}’ | sed -e ‘s/^NULL$/-1/’"

    Just the point is...i'm missing userparemeter_mysql.conf

    Thank you for all your help
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    You need to copy that file there... installing agent does not create any additional mysql userparameters.. its your responsibility to copy that file to each host where you need it.

    Comment

    • Patryk01
      Junior Member
      • Oct 2022
      • 3

      #3
      Sometimes the easiest things are somehow the harderst...
      thank you, is there an official template how does this file need to look somewhere in zabbix.com repository?

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        You said you were following somekind of a doc and tutorial... Didn't those mention this?

        There are several different ones on integration page ... https://www.zabbix.com/integration_search?search=mysql One of them uses Userparameters...

        Comment

        Working...