';
$json = str_decompress($attribs['juniper-firewall-mib']);
if (!$json) {
// Compat with old uncompressed
$json = $attribs['juniper-firewall-mib'];
}
if ($filters = safe_json_decode($json)) {
ksort($filters);
}
foreach ($filters as $filter => $counters) {
ksort($counters);
foreach ($counters as $counter => $types) {
foreach ($types as $type => $data) {
echo '
' . $filter . ' | ' . $counter . ' | ' . $type . ' |
';
echo '';
echo '';
echo 'Packets';
$graph_array = ['type' => 'device_juniper-firewall-pkts',
'device' => $device['device_id'],
'filter' => safename($filter),
'counter' => safename($counter),
'counter_type' => safename($type)
];
print_graph_row($graph_array);
echo 'Bytes';
$graph_array = ['type' => 'device_juniper-firewall-bits',
'device' => $device['device_id'],
'filter' => safename($filter),
'counter' => safename($counter),
'counter_type' => safename($type)
];
print_graph_row($graph_array);
echo ' |
';
}
}
}
echo '';
unset($json, $filters);
// EOF