= "1") { echo("Checking RouterOS Wireless clients... "); $wificlients1 = snmp_get($device, "mtxrWlApClientCount.10", "-OUqnv", "MIKROTIK-MIB"); echo(($wificlients1 +0) . " clients\n"); break; } unset($wirelesscards); } } ##### RRD Filling Code if (isset($wificlients1) && $wificlients1 != "") { $wificlientsrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("wificlients-radio1.rrd"); if (!is_file($wificlientsrrd)) { rrdtool_create($wificlientsrrd,"--step 300 \ DS:wificlients:GAUGE:600:-273:1000 \ RRA:AVERAGE:0.5:1:1200 \ RRA:MIN:0.5:12:2400 \ RRA:MAX:0.5:12:2400 \ RRA:AVERAGE:0.5:12:2400"); } rrdtool_update($wificlientsrrd,"N:".$wificlients1); $graphs['wifi_clients'] = TRUE; } if (isset($wificlients2) && $wificlients2 != "") { $wificlientsrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("wificlients-radio2.rrd"); if (!is_file($wificlientsrrd)) { rrdtool_create($wificlientsrrd,"--step 300 \ DS:wificlients:GAUGE:600:-273:1000 \ RRA:AVERAGE:0.5:1:1200 \ RRA:MIN:0.5:12:2400 \ RRA:MAX:0.5:12:2400 \ RRA:AVERAGE:0.5:12:2400"); } rrdtool_update($wificlientsrrd,"N:".$wificlients2); $graphs['wifi_clients'] = TRUE; } unset($wificlients2, $wificlients1); } echo("\n"); ?>