Skip to content

fluent-bit-script.lua:42: attempt to perform arithmetic on global 'id1' (a nil value) #9997

Answered by yswdqz
mahmoud-anwer asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, I’m glad that I could be of help.
The reason for this problem is that the slow log of mariadb is different from the slow log of mysql.
All the thing fluent-bit-script.lua do is extract data from log and put them in to a JSON string.
So if the format is different, this script will not work. You can just change mariadb to mysql, this problem will resolve.
If it is necessary to use mariadb. You can write a corresponding script yourself. The format of mariadb is following:

# Time: 200929 15:42:35
# User@Host: root[root] @  [192.168.1.1]
# Thread_id: 2332  Schema: parkcloud_performancetest  QC_hit: No
# Query_time: 10.93443  Lock_time: 0.000091  Rows_sent: 5  Rows_examined: 9022
# Rows_aff…

Replies: 3 comments 55 replies

Comment options

You must be logged in to vote
53 replies
@mahmoud-anwer
Comment options

@yswdqz
Comment options

yswdqz Dec 6, 2022
Collaborator

@wu-sheng
Comment options

wu-sheng Dec 6, 2022
Collaborator

@mahmoud-anwer
Comment options

@wu-sheng
Comment options

wu-sheng Dec 6, 2022
Collaborator

Answer selected by yswdqz
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@wu-sheng
Comment options

@mahmoud-anwer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants