imperva / mx-toolbox

mx-toolbox is a collection of scripts that will perform various API driven automation tasks, and are typically invoked by the "run OS command" action set from the MX itself. There is a common utility library that is shared by these scripts.
MIT License
14 stars 9 forks source link

Script stops gathering data #9

Open wboy87 opened 1 year ago

wboy87 commented 1 year ago

Hi, I notice I am missing data from time to time. In logs is following? Any Idea what is wrong? 2023-06-14T08:20:01.150528+02:00 localhost CROND[22569]: (root) CMD (/usr/bin/python /var/user-data/get_gateway_stats.py) 2023-06-14T08:20:01.151041+02:00 localhost CROND[22568]: (root) CMD (/usr/lib64/sa/sa1 1 1) 2023-06-14T08:20:01.837622+02:00 localhost CROND[22565]: (root) CMDOUT (Traceback (most recent call last):) 2023-06-14T08:20:01.838951+02:00 localhost CROND[22565]: (root) CMDOUT ( File "/var/user-data/get_gateway_stats.py", line 699, in ) 2023-06-14T08:20:01.839275+02:00 localhost CROND[22565]: (root) CMDOUT ( run()) 2023-06-14T08:20:01.839594+02:00 localhost CROND[22565]: (root) CMDOUT ( File "/var/user-data/get_gateway_stats.py", line 191, in run) 2023-06-14T08:20:01.839915+02:00 localhost CROND[22565]: (root) CMDOUT ( getSysStats()) 2023-06-14T08:20:01.840219+02:00 localhost CROND[22565]: (root) CMDOUT ( File "/var/user-data/get_gateway_stats.py", line 390, in getSysStats) 2023-06-14T08:20:01.840518+02:00 localhost CROND[22565]: (root) CMDOUT ( sysStat.append("current_revision=" + revision_update_data[current_revision_index])) 2023-06-14T08:20:01.840838+02:00 localhost CROND[22565]: (root) CMDOUT (IndexError: list index out of range) ... 2023-06-14T08:30:01.855446+02:00 localhost CROND[29578]: (root) CMD (/usr/lib64/sa/sa1 1 1) 2023-06-14T08:30:01.856369+02:00 localhost CROND[29579]: (root) CMD (/usr/sbin/logrotate /etc/logrotate.conf) 2023-06-14T08:30:01.857190+02:00 localhost CROND[29580]: (root) CMD (/usr/bin/python /var/user-data/get_gateway_stats.py) 2023-06-14T08:30:01.884208+02:00 localhost CROND[29563]: (root) CMDOUT (error: Ignoring an-phase1 because of bad file mode - must be 0644 or 0444.) 2023-06-14T08:30:01.886266+02:00 localhost CROND[29563]: (root) CMDOUT (error: Ignoring oracle because of bad file mode - must be 0644 or 0444.) 2023-06-14T08:30:01.886751+02:00 localhost CROND[29563]: (root) CMDOUT (error: Ignoring pce because of bad file mode - must be 0644 or 0444.) 2023-06-14T08:30:01.887236+02:00 localhost CROND[29563]: (root) CMDOUT (error: Ignoring server-ha because of bad file mode - must be 0644 or 0444.) 2023-06-14T08:30:01.887737+02:00 localhost CROND[29563]: (root) CMDOUT (error: Ignoring sqlplus because of bad file mode - must be 0644 or 0444.) 2023-06-14T08:30:01.888886+02:00 localhost CROND[29563]: (root) CMDOUT (error: Ignoring waagent-extn.logrotate because of bad file mode - must be 0644 or 0444.) 2023-06-14T08:30:01.889392+02:00 localhost CROND[29563]: (root) CMDOUT (error: Ignoring waagent.logrotate because of bad file mode - must be 0644 or 0444.) 2023-06-14T08:30:02.588399+02:00 localhost CROND[29565]: (root) CMDOUT (Traceback (most recent call last):) 2023-06-14T08:30:02.588861+02:00 localhost CROND[29565]: (root) CMDOUT ( File "/var/user-data/get_gateway_stats.py", line 699, in ) 2023-06-14T08:30:02.589162+02:00 localhost CROND[29565]: (root) CMDOUT ( run()) 2023-06-14T08:30:02.589435+02:00 localhost CROND[29565]: (root) CMDOUT ( File "/var/user-data/get_gateway_stats.py", line 191, in run) 2023-06-14T08:30:02.589699+02:00 localhost CROND[29565]: (root) CMDOUT ( getSysStats()) 2023-06-14T08:30:02.590009+02:00 localhost CROND[29565]: (root) CMDOUT ( File "/var/user-data/get_gateway_stats.py", line 390, in getSysStats) 2023-06-14T08:30:02.590278+02:00 localhost CROND[29565]: (root) CMDOUT ( sysStat.append("current_revision=" + revision_update_data[current_revision_index])) 2023-06-14T08:30:02.590543+02:00 localhost CROND[29565]: (root) CMDOUT (IndexError: list index out of range)

BR

mihaiturcu commented 8 months ago

related to this: https://github.com/imperva/mx-toolbox/issues/6