Hi, I'm trying to get a plugin working. I downloaded the mySQL Monitoring module from here : https://pandorafms.com/library/mysql-performance-plugin/ The original script had a few typos and errors, and I fixed it so it returns 0 when it exited and it outputs XML Correctly. I put the script in /etc/pandora/plugins/mysql_plugin ran :
chmod +x /etc/pandora/plugins/mysql_plugin
chown pandora:root /etc/pandora/plugins/mysql_plugin
then vi /etc/pandora/pandora_agent.conf and added :
# Plugin for mySQL monitoring
module_plugin mysql_plugin 'pandora' 'PASSWORD'
when I run the script ./mysql_plugin, it outputs a stream of XML, which looks correct, and exits 0. However, when I restart the daemon, no data appears in the server. I turned on debugging, and the data is not in the data file in the /tmp directory either. So, I created a "jon_test" plugin which just output one piece of data, and that works. How can I debug whats going wrong with the mysql plugin ? What types of things would make the daemon fail to include the output in the data it sends ?
[root plugins]# cat /var/log/pandora/pandora_agent.log
2019/01/02 23:24:25 - [log] - Running as user root
2019/01/02 23:24:25 - [setup] - server_ip is 172.21.22.14
2019/01/02 23:24:25 - [setup] - server_path is /var/spool/pandora/data_in
2019/01/02 23:24:25 - [setup] - temporal is /tmp
2019/01/02 23:24:25 - [setup] - logfile is /var/log/pandora/pandora_agent.log
2019/01/02 23:24:25 - [setup] - interval is 300
2019/01/02 23:24:25 - [setup] - debug is 1
2019/01/02 23:24:25 - [setup] - udp_server is 0
2019/01/02 23:24:25 - [setup] - udp_server_port is 41122
2019/01/02 23:24:25 - [setup] - udp_server_auth_address is 0.0.0.0
2019/01/02 23:24:25 - [setup] - agent_name is XXXXXX
2019/01/02 23:24:25 - [setup] - agent_name_cmd is __rand__
2019/01/02 23:24:25 - [setup] - agent_alias is XXXXXX
2019/01/02 23:24:25 - [setup] - group is Servers
2019/01/02 23:24:25 - [setup] - address is auto
2019/01/02 23:24:25 - [setup] - server_port is 41121
2019/01/02 23:24:25 - [setup] - transfer_mode is tentacle
2019/01/02 23:24:25 - [setup] - remote_config is 0
2019/01/02 23:24:25 - [setup] - xml_buffer is 1
2019/01/02 23:24:25 - [setup] - temporal_min_size is 1024
2019/01/02 23:24:25 - [setup] - ehorus_conf is /etc/ehorus/ehorus_agent.conf
2019/01/02 23:24:25 - [log] - Thread is disabled.
2019/01/02 23:24:26 - [debug] - Executing module CPU Load (vmstat 1 2 | tail -1 | awk '{ print $13 }' 2> /dev/null)
2019/01/02 23:24:27 - [debug] - Executing module CPU IOWait (vmstat 1 2 | tail -1 | awk '{ print $16 }' 2> /dev/null)
2019/01/02 23:24:27 - [debug] - Executing module Load Average (cat /proc/loadavg | cut -d' ' -f1 2> /dev/null)
2019/01/02 23:24:27 - [debug] - Executing module TCP_Connections (netstat -an | grep tcp | grep -v LIST | wc -l 2> /dev/null)
2019/01/02 23:24:27 - [debug] - Executing plugin: pandora_df_used
2019/01/02 23:24:27 - [debug] - Executing plugin: pandora_mem_used
2019/01/02 23:24:27 - [debug] - Executing plugin: pandora_netusage
2019/01/02 23:24:27 - [debug] - Executing plugin: mysql_plugin
2019/01/02 23:24:27 - [debug] - Executing plugin: jontest1
2019/01/02 23:24:27 - [debug] - Wrote XML data file '/tmp/TeesCottage.1546471467.data'
jontest1 just does this :
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
but the mysql_plugin does not. The first few rows of mysql_plugin outputs this, when run on the command line:
[root plugins]# ./mysql_plugin
]>
which all looks correct ? Help ? Thanks, Jon.
