statusengine / worker

PHP worker process that writes all event data to a storage backend
https://statusengine.org/worker/#overview
GNU General Public License v3.0
9 stars 8 forks source link

Big output in stdout #33

Closed duylong closed 3 years ago

duylong commented 3 years ago

Hi,

Is it normal to have the lines below in the stdout?

...
statusengine-worker[11]: Run the worker in foreground mode to see the full query: https://statusengine.org/worker/#debugging
SQL: [312] INSERT INTO statusengine_servicechecks
    (hostname, service_description, state, is_hardstate, start_time, start_time_usec, end_time, output, timeout, early_timeout, latency, execution_time, perfdata, command, current_check_attempt, max_check_attempts, long_output)
    VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
Sent SQL: [593] INSERT INTO statusengine_servicechecks
    (hostname, service_description, state, is_hardstate, start_time, start_time_usec, end_time, output, timeout, early_timeout, latency, execution_time, perfdata, command, current_check_attempt, max_check_attempts, long_output)
    VALUES('XXXX','XXXX','0','1','1620147552','569020','1620147553','OK: statusengine-worker status is RUNNING','60','0','0.872684','0.695443','','XXXX','1','3','')
Params:  17
Key: Position #0:
paramno=0
name=[0] ""
is_param=1
param_type=2
Key: Position #1:
paramno=1
name=[0] ""
is_param=1
param_type=2
Key: Position #2:
paramno=2
name=[0] ""
is_param=1
param_type=2
Key: Position #3:
paramno=3
name=[0] ""
is_param=1
param_type=2
Key: Position #4:
paramno=4
name=[0] ""
is_param=1
param_type=2
Key: Position #5:
paramno=5
name=[0] ""
is_param=1
param_type=2
Key: Position #6:
paramno=6
name=[0] ""
is_param=1
param_type=2
Key: Position #7:
paramno=7
name=[0] ""
is_param=1
param_type=2
Key: Position #8:
paramno=8
name=[0] ""
is_param=1
param_type=2
Key: Position #9:
paramno=9
name=[0] ""
is_param=1
param_type=2
Key: Position #10:
paramno=10
name=[0] ""
is_param=1
param_type=2
Key: Position #11:
paramno=11
name=[0] ""
is_param=1
param_type=2
Key: Position #12:
paramno=12
name=[0] ""
is_param=1
param_type=2
Key: Position #13:
paramno=13
name=[0] ""
is_param=1
param_type=2
Key: Position #14:
paramno=14
name=[0] ""
is_param=1
param_type=2
Key: Position #15:
paramno=15
name=[0] ""
is_param=1
param_type=2
Key: Position #16:
paramno=16
name=[0] ""
is_param=1
param_type=2
nook24 commented 3 years ago

Hm no, probably the output of the plugin is to long and MySQL returns an error. Could you please try to execute the original SQL query on your system and report the error message MySQL returns?

I was able to the query from your post without any errors:

INSERT INTO statusengine_servicechecks
    (hostname, service_description, state, is_hardstate, start_time, start_time_usec, end_time, output, timeout, early_timeout, latency, execution_time, perfdata, command, current_check_attempt, max_check_attempts, long_output)
    VALUES('XXXX','XXXX','0','1','1620147552','569020','1620147553','OK: statusengine-worker status is RUNNING','60','0','0.872684','0.695443','','XXXX','1','3','')

But it also not the original query due to anonymization

duylong commented 3 years ago

It seems that I had a problem during the migration. I am using a different database name, but in the mysql_update.sql file the database is set to statusengine. I will already fix this problem and close this one ...