15 lines
699 B
Bash
Executable File
15 lines
699 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "<html>
|
|
<head>
|
|
<meta http-equiv='refresh' content='60; URL=port_changes.html'>
|
|
</head>
|
|
<body>
|
|
Ports mit ifAdminStatus = 'down' werden nicht angezeigt.<br>" > /var/www/html/port_changes.html
|
|
|
|
echo "select devices.hostname, ports.port_label, ports.ifAlias, ports.ifOperStatus, ports.ifLastChange from ports inner join devices on ports.device_id = devices.device_id where TIMESTAMPDIFF(SECOND, ifLastChange, NOW())<'86400' and ports.ifAdminStatus = 'up' order by ports.ifLastChange desc"| mysql -H --user=observium --password=observium observium >> /var/www/html/port_changes.html
|
|
|
|
echo "" >> /var/www/html/port_changes.html
|
|
echo "</body>
|
|
</html>" >> /var/www/html/port_changes.html
|