Search code examples
mysqlmachine-learningzabbix

Need Mysql Zabbix data for CPU utilization, memory utilization, Disk space utilization for creating ML profile


I have installed Zabbix 4.0 for remote monitoring of Linux server. My first understanding is that the Zabbix-agent monitors the server and send the data to Mysql database for storing. The Zabbix frontend retrieves the data from Mysql database and shows the above-said metrics (in the form of graphs), as shown in the attached image.of CPU load

Now, instead of directly viewing from the web interface, I want to construct the ML model from metrics like CPU utilization/load, memory utilization, hard disk usage, and traffic in/out. I checked all the Columns of all the Tables in Mysql database to retrieve the above-said metrics. However, I could not find any columns or tables that stored these metrics. My second is understanding is that Zabbix front-end constructs these metrics on graph indirectly from the stored columns in Mysql databse Tables.

  1. I want to know if my both the understandings are correct or no.
  2. I also want to know, considering my both understandings are true, how do i extract metrics like CPU utilization/load, memory utilization, hard disk usage, and traffic in/out for constructing ML model from data that is stored in Mysql database.
  3. If my understandings are false, how should I collect these metrics.

Any details or documentation that could help me is appreciable.


Solution

  • Zabbix data is stored in the Mysql database in various tables (history and trends, differentiated by data type). The difference between history and trend is described here.

    I strongly advise against the direct use of mysql, because of complexity and compatibility. The best course of action is through the API (history.get and trend.get) to extract the data and feed it to your ML.

    Zabbix itself supports predictive triggering, but I did not implement it yet.