Answer the question
In order to leave comments, you need to log in
How to monitor information in html plate through zabbix?
There is a certain html table, the data in which is updated every n seconds
<html>
<head>
<title>Подключения</title>
<style type="text/css">
table {
border: 2px solid black;
border-collapse: collapse;
}
td, th {
border: 1px solid black;
padding: 2px;
}
</style>
<script type="text/javascript">
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);", timeoutPeriod);
}
</script>
</head>
<table>
<tr>
<th>IP Address</th>
<th>Computer name</th>
<th>Terminal name</th>
<th>Login</th>
<th>Module ID</th>
<th>Module name</th>
<th>Module display name</th>
<th>Last activity</th>
</tr>
<tr>
<td>
192.168.10.1
</td>
<td>
192.168.10.1
</td>
<td>
admin
</td>
<td>
admin
</td>
<td style="text-align: right">
200
</td>
<td>
BACK
</td>
<td>
BACKOffice
</td>
<td>
2018-07-21T09:24:00.460+03:00
</td>
</tr>
<tr>
<td>
192.168.10.1
</td>
<td>
POS1
</td>
<td>
Кафе
</td>
<td>
</td>
<td style="text-align: right">
101
</td>
<td>
FRONT
</td>
<td>
FRONTOffice
</td>
<td>
2018-07-21T09:24:22.929+03:00
</td>
</tr>
<tr>
<td>
192.168.10.1
</td>
<td>
POS2
</td>
<td>
Бар
</td>
<td>
</td>
<td style="text-align: right">
1200
</td>
<td>
UNKNOWN
</td>
<td>
FRONTOffice
</td>
<td>
2018-07-21T09:24:22.929+03:00
</td>
</tr>
</table>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
We put similar things in Zabbix like this: Using Python,
we turn the data into JSON {'{#ITEM}': '605', ...}, one JSON for the discovery rule and creating a prototype of data elements by a parameter that will be unique in the table (computer name?), the second JSON that will be sent over the generated data. And then prototypes of dependent data elements are created in zabbix, which, through regexp, pull out the necessary parameters from the JSON string.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question