diff --git a/includes/polling/applications/fbsd-nfs-client.inc.php b/includes/polling/applications/fbsd-nfs-client.inc.php index bbd5d1b18b..be080553ba 100644 --- a/includes/polling/applications/fbsd-nfs-client.inc.php +++ b/includes/polling/applications/fbsd-nfs-client.inc.php @@ -1,17 +1,38 @@ getOutput(); -list($getattr, $setattr, $lookup, $readlink, $read, $write, $create, $remove, $rename, $link, $symlink, $mkdir, $rmdir, - $readdir, $rdirplus, $access, $mknod, $fsstat, $fsinfo, $pathconf, $commit, $timedout, $invalid, $xreplies, $retries, - $requests, $attrhits, $attrmisses, $lkuphits, $lkupmisses, $biorhits, $biormisses, $biowhits, $biowmisses, $biorlhits, - $biorlmisses, $biodhits, $biodmisses, $direhits, $diremisses, $accshits, $accsmisses) = explode("\n", $nfsclient); + $nfs=array( + 'data' => array(), + ); + + list($nfs['data']['Getattr'], $nfs['data']['Setattr'], $nfs['data']['Lookup'], $nfs['data']['Readlink'], + $nfs['data']['Read'], $nfs['data']['Write'], $nfs['data']['Create'], $nfs['data']['Remove'], $nfs['data']['Rename'], + $nfs['data']['Link'], $nfs['data']['Symlink'], $nfs['data']['Mkdir'], $nfs['data']['Rmdir'], $nfs['data']['Readdir'], + $nfs['data']['RdirPlus'], $nfs['data']['Access'], $nfs['data']['Mknod'], $nfs['data']['Fsstat'], $nfs['data']['Fsinfo'], + $nfs['data']['PathConf'], $nfs['data']['Commit'], $nfs['data']['TimedOut'], $nfs['data']['Invalid'], $nfs['data']['XReplies'], + $nfs['data']['Retries'], $nfs['data']['Requests'], $nfs['data']['AttrHits'], $nfs['data']['AttrMisses'], $nfs['data']['LkupHits'], + $nfs['data']['LkupMisses'], $nfs['data']['BioRHits'], $nfs['data']['BioRMisses'], $nfs['data']['BioWHits'], + $nfs['data']['BioWMisses'], $nfs['data']['BioRLHits'], $nfs['data']['BioRLMisses'], $nfs['data']['BioDHits'], + $nfs['data']['BioDMisses'], $nfs['data']['DirEHits'], $nfs['data']['DirEMisses'], $nfs['data']['AccsHits'], + $nfs['data']['AccsMisses']) = explode("\n", $legacy); +} catch (JsonAppException $e) { + echo PHP_EOL . $name . ':' .$e->getCode().':'. $e->getMessage() . PHP_EOL; + update_application($app, $e->getCode().':'.$e->getMessage(), []); // Set empty metrics and error message + return; +} $rrd_name = array('app', $name, $app_id); $rrd_def = RrdDefinition::make() @@ -59,50 +80,50 @@ $rrd_def = RrdDefinition::make() ->addDataset('accsmisses', 'DERIVE', 0); $fields = array( - 'getattr' => $getattr, - 'setattr' => $setattr, - 'lookup' => $lookup, - 'readlink' => $readlink, - 'read' => $read, - 'write' => $write, - 'create' => $create, - 'remove' => $remove, - 'rename' => $rename, - 'link' => $link, - 'symlink' => $symlink, - 'mkdir' => $mkdir, - 'rmdir' => $rmdir, - 'readdir' => $readdir, - 'rdirplus' => $rdirplus, - 'access' => $access, - 'mknod' => $mknod, - 'fsstat' => $fsstat, - 'fsinfo' => $fsinfo, - 'pathconf' => $pathconf, - 'commit' => $commit, - 'timedout' => $timedout, - 'invalid' => $invalid, - 'xreplies' => $xreplies, - 'retries' => $retries, - 'requests' => $requests, - 'attrhits' => $attrhits, - 'attrmisses' => $attrmisses, - 'lkuphits' => $lkuphits, - 'lkupmisses' => $lkupmisses, - 'biorhits' => $biorhits, - 'biormisses' => $biormisses, - 'biowhits' => $biowhits, - 'biowmisses' => $biowmisses, - 'biorlhits' => $biorlhits, - 'biorlmisses' => $biorlmisses, - 'biodhits' => $biodhits, - 'biodmisses' => $biodmisses, - 'direhits' => $direhits, - 'diremisses' => $diremisses, - 'accshits' => $accshits, - 'accsmisses' => $accsmisses, + 'getattr' => $nfs['data']['Getattr'], + 'setattr' => $nfs['data']['Setattr'], + 'lookup' => $nfs['data']['Lookup'], + 'readlink' => $nfs['data']['Readlink'], + 'read' => $nfs['data']['Read'], + 'write' => $nfs['data']['Write'], + 'create' => $nfs['data']['Create'], + 'remove' => $nfs['data']['Remove'], + 'rename' => $nfs['data']['Rename'], + 'link' => $nfs['data']['Link'], + 'symlink' => $nfs['data']['SymLink'], + 'mkdir' => $nfs['data']['Mkdir'], + 'rmdir' => $nfs['data']['Rmdir'], + 'readdir' => $nfs['data']['Readdir'], + 'rdirplus' => $nfs['data']['RdirPlus'], + 'access' => $nfs['data']['Access'], + 'mknod' => $nfs['data']['Mknod'], + 'fsstat' => $nfs['data']['Fsstat'], + 'fsinfo' => $nfs['data']['Fsinfo'], + 'pathconf' => $nfs['data']['PathConf'], + 'commit' => $nfs['data']['Commit'], + 'timedout' => $nfs['data']['Timedout'], + 'invalid' => $nfs['data']['Invalid'], + 'xreplies' => $nfs['data']['XReplies'], + 'retries' => $nfs['data']['Retries'], + 'requests' => $nfs['data']['Requests'], + 'attrhits' => $nfs['data']['AttrHits'], + 'attrmisses' => $nfs['data']['AttrMisses'], + 'lkuphits' => $nfs['data']['LkupHits'], + 'lkupmisses' => $nfs['data']['LkupMisses'], + 'biorhits' => $nfs['data']['BioRHits'], + 'biormisses' => $nfs['data']['BioRMisses'], + 'biowhits' => $nfs['data']['BioWHits'], + 'biowmisses' => $nfs['data']['BioWMisses'], + 'biorlhits' => $nfs['data']['BioRLHits'], + 'biorlmisses' => $nfs['data']['BioRLMisses'], + 'biodhits' => $nfs['data']['BioDHits'], + 'biodmisses' => $nfs['data']['BioDMisses'], + 'direhits' => $nfs['data']['DirEHits'], + 'diremisses' => $nfs['data']['DirEMisses'], + 'accshits' => $nfs['data']['AccsHits'], + 'accsmisses' => $nfs['data']['AccsMisses'], ); $tags = array('name' => $name, 'app_id' => $app_id, 'rrd_def' => $rrd_def, 'rrd_name' => $rrd_name); data_update($device, 'app', $tags, $fields); -update_application($app, $nfsclient, $fields); +update_application($app, 'OK', $nfs['data']); diff --git a/includes/polling/applications/fbsd-nfs-server.inc.php b/includes/polling/applications/fbsd-nfs-server.inc.php index 88d66f1877..7211702f32 100644 --- a/includes/polling/applications/fbsd-nfs-server.inc.php +++ b/includes/polling/applications/fbsd-nfs-server.inc.php @@ -1,16 +1,36 @@ getOutput(); + + $nfs=array( + 'data' => array(), + ); + list($nfs['data']['Getattr'], $nfs['data']['Setattr'], $nfs['data']['Lookup'], $nfs['data']['Readlink'], + $nfs['data']['Read'], $nfs['data']['Write'], $nfs['data']['Create'], $nfs['data']['Remove'], + $nfs['data']['Rename'], $nfs['data']['Link'], $nfs['data']['Symlink'], $nfs['data']['Mkdir'], + $nfs['data']['Rmdir'], $nfs['data']['Readdir'], $nfs['data']['RdirPlus'], $nfs['data']['Access'], + $nfs['data']['Mknod'], $nfs['data']['Fsstat'], $nfs['data']['Fsinfo'], $nfs['data']['PathConf'], + $nfs['data']['Commit'], $nfs['data']['RetFailed'], $nfs['data']['Faults'], $nfs['data']['Inprog'], + $nfs['data']['Idem'], $nfs['data']['Nonidem'], $nfs['data']['Misses'], $nfs['data']['WriteOps'], + $nfs['data']['WriteRPC'], $nfs['data']['Opsaved']) = explode("\n", $legacy); +} catch (JsonAppException $e) { + echo PHP_EOL . $name . ':' .$e->getCode().':'. $e->getMessage() . PHP_EOL; + update_application($app, $e->getCode().':'.$e->getMessage(), []); // Set empty metrics and error message + return; +} $rrd_name = array('app', $name, $app_id); $rrd_def = RrdDefinition::make() @@ -46,38 +66,38 @@ $rrd_def = RrdDefinition::make() ->addDataset('opsaved', 'DERIVE', 0); $fields = array( - 'getattr' => $getattr, - 'setattr' => $setattr, - 'lookup' => $lookup, - 'readlink' => $readlink, - 'read' => $read, - 'write' => $write, - 'create' => $create, - 'remove' => $remove, - 'rename' => $rename, - 'link' => $link, - 'symlink' => $symlink, - 'mkdir' => $mkdir, - 'rmdir' => $rmdir, - 'readdir' => $readdir, - 'rdirplus' => $rdirplus, - 'access' => $access, - 'mknod' => $mknod, - 'fsstat' => $fsstat, - 'fsinfo' => $fsinfo, - 'pathconf' => $pathconf, - 'commit' => $commit, - 'retfailed' => $retfailed, - 'faults' => $faults, - 'inprog' => $inprog, - 'idem' => $idem, - 'nonidem' => $nonidem, - 'misses' => $misses, - 'writeops' => $writeops, - 'writerpc' => $writerpc, - 'opsaved' => $opsaved, + 'getattr' => $nfs['data']['Getattr'], + 'setattr' => $nfs['data']['Setattr'], + 'lookup' => $nfs['data']['Lookup'], + 'readlink' => $nfs['data']['Readlink'], + 'read' => $nfs['data']['Read'], + 'write' => $nfs['data']['Write'], + 'create' => $nfs['data']['Create'], + 'remove' => $nfs['data']['Remove'], + 'rename' => $nfs['data']['Rename'], + 'link' => $nfs['data']['Link'], + 'symlink' => $nfs['data']['Symlink'], + 'mkdir' => $nfs['data']['Mkdir'], + 'rmdir' => $nfs['data']['Rmdir'], + 'readdir' => $nfs['data']['Readdir'], + 'rdirplus' => $nfs['data']['RdirPlus'], + 'access' => $nfs['data']['Access'], + 'mknod' => $nfs['data']['Mknod'], + 'fsstat' => $nfs['data']['Fsstat'], + 'fsinfo' => $nfs['data']['Fsinfo'], + 'pathconf' => $nfs['data']['PathConf'], + 'commit' => $nfs['data']['Commit'], + 'retfailed' => $nfs['data']['RetFailed'], + 'faults' => $nfs['data']['Faults'], + 'inprog' => $nfs['data']['Inprog'], + 'idem' => $nfs['data']['Idem'], + 'nonidem' => $nfs['data']['Nonidem'], + 'misses' => $nfs['data']['Misses'], + 'writeops' => $nfs['data']['WriteOps'], + 'writerpc' => $nfs['data']['WriteRPC'], + 'opsaved' => $nfs['data']['Opsaved'], ); $tags = array('name' => $name, 'app_id' => $app_id, 'rrd_def' => $rrd_def, 'rrd_name' => $rrd_name); data_update($device, 'app', $tags, $fields); -update_application($app, $nfsserver, $fields); +update_application($app, 'OK', $nfs['data']); diff --git a/tests/data/linux_fbsd-nfs-client-legacy.json b/tests/data/linux_fbsd-nfs-client-legacy.json new file mode 100644 index 0000000000..914c0bf520 --- /dev/null +++ b/tests/data/linux_fbsd-nfs-client-legacy.json @@ -0,0 +1,279 @@ +{ +"applications": { + "discovery": { + "applications": [ { + "app_type": "fbsd-nfs-client", + "app_state": "UNKNOWN", + "discovered": "1", + "app_state_prev": null, + "app_status": "", + "app_instance": "" + } ], + "application_metrics": [] + }, + "poller": { + "applications": [ { + "app_type": "fbsd-nfs-client", + "app_state": "OK", + "discovered": "1", + "app_state_prev": "UNKNOWN", + "app_status": "", + "app_instance": "" + } ], + "application_metrics": [ + { + "metric": "Access", + "value": "3466781", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "AccsHits", + "value": "185464479", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "AccsMisses", + "value": "3466788", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "AttrHits", + "value": "220102448", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "AttrMisses", + "value": "3466788.0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioDHits", + "value": "307976", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioDMisses", + "value": "253474", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioRHits", + "value": "6732423", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioRLHits", + "value": "35758", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioRLMisses", + "value": "471", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioRMisses", + "value": "1089394", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioWHits", + "value": "2404874", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioWMisses", + "value": "586999", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Commit", + "value": "284630", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Create", + "value": "49839", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "DirEHits", + "value": "118413", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "DirEMisses", + "value": "41", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Fsinfo", + "value": "14", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Fsstat", + "value": "139608", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Getattr", + "value": "2766953", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Invalid", + "value": "393", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Link", + "value": "1638", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "LkupHits", + "value": "177587683", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "LkupMisses", + "value": "7633614", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Lookup", + "value": "7652459", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Mkdir", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Mknod", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "PathConf", + "value": "12", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "RdirPlus", + "value": "0.0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Read", + "value": "10126037", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Readdir", + "value": "289778", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Readlink", + "value": "471", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Remove", + "value": "40834", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Rename", + "value": "39039", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Requests", + "value": "25500410", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Retries", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Rmdir", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Setattr", + "value": "55235", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Symlink", + "value": "40", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "TimedOut", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Write", + "value": "586992", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "XReplies", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + } + ] + } +} +} diff --git a/tests/data/linux_fbsd-nfs-client-v1.json b/tests/data/linux_fbsd-nfs-client-v1.json new file mode 100644 index 0000000000..15c0e4978b --- /dev/null +++ b/tests/data/linux_fbsd-nfs-client-v1.json @@ -0,0 +1,279 @@ +{ +"applications": { + "discovery": { + "applications": [ { + "app_type": "fbsd-nfs-client", + "app_state": "UNKNOWN", + "discovered": "1", + "app_state_prev": null, + "app_status": "", + "app_instance": "" + } ], + "application_metrics": [] + }, + "poller": { + "applications": [ { + "app_type": "fbsd-nfs-client", + "app_state": "OK", + "discovered": "1", + "app_state_prev": "UNKNOWN", + "app_status": "", + "app_instance": "" + } ] , + "application_metrics": [ + { + "metric": "Access", + "value": "3466781", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "AccsHits", + "value": "185464479", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "AccsMisses", + "value": "3466788", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "AttrHits", + "value": "220102448", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "AttrMisses", + "value": "2766941", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioDHits", + "value": "307976", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioDMisses", + "value": "253474", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioRHits", + "value": "6732423", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioRLHits", + "value": "35758", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioRLMisses", + "value": "471", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioRMisses", + "value": "1089394", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioWHits", + "value": "2404874", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "BioWMisses", + "value": "586999", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Commit", + "value": "284630", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Create", + "value": "49839", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "DirEHits", + "value": "118413", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "DirEMisses", + "value": "41", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Fsinfo", + "value": "14", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Fsstat", + "value": "139608", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Getattr", + "value": "2766953", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Invalid", + "value": "393", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Link", + "value": "1638", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "LkupHits", + "value": "177587683", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "LkupMisses", + "value": "7633614", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Lookup", + "value": "7652459", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Mkdir", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Mknod", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "PathConf", + "value": "12", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "RdirPlus", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Read", + "value": "10126037", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Readdir", + "value": "289778", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Readlink", + "value": "471", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Remove", + "value": "40834", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Rename", + "value": "39039", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Requests", + "value": "25500410", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Retries", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Rmdir", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Setattr", + "value": "55235", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Symlink", + "value": "40", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "TimedOut", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "Write", + "value": "586992", + "value_prev": null, + "app_type": "fbsd-nfs-client" + }, + { + "metric": "XReplies", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-client" + } + ] + } +} +} diff --git a/tests/data/linux_fbsd-nfs-server-legacy.json b/tests/data/linux_fbsd-nfs-server-legacy.json new file mode 100644 index 0000000000..37860d15d7 --- /dev/null +++ b/tests/data/linux_fbsd-nfs-server-legacy.json @@ -0,0 +1,207 @@ +{ +"applications": { + "discovery": { + "applications": [ { + "app_type": "fbsd-nfs-server", + "app_state": "UNKNOWN", + "discovered": "1", + "app_state_prev": null, + "app_status": "", + "app_instance": "" + } ], + "application_metrics": [] + }, + "poller": { + "applications": [ { + "app_type": "fbsd-nfs-server", + "app_state": "OK", + "discovered": "1", + "app_state_prev": "UNKNOWN", + "app_status": "", + "app_instance": "" + } ], + "application_metrics": [ + { + "metric": "Access", + "value": "2756963", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Commit", + "value": "226823", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Create", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Faults", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Fsinfo", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Fsstat", + "value": "108431", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Getattr", + "value": "2131314", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Idem", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Inprog", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Link", + "value": "1250", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Lookup", + "value": "6062252", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Misses", + "value": "20162662", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Mkdir", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Mknod", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Nonidem", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Opsaved", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "PathConf", + "value": "12", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "RdirPlus", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Read", + "value": "8043676", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Readdir", + "value": "221801", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Readlink", + "value": "394", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Remove", + "value": "32375", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Rename", + "value": "31097", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "RetFailed", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Rmdir", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Setattr", + "value": "43045", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Symlink", + "value": "24", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Write", + "value": "464478", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "WriteOps", + "value": "464478", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "WriteRPC", + "value": "464478", + "value_prev": null, + "app_type": "fbsd-nfs-server" + } + ] + } +} +} diff --git a/tests/data/linux_fbsd-nfs-server-v1.json b/tests/data/linux_fbsd-nfs-server-v1.json new file mode 100644 index 0000000000..37860d15d7 --- /dev/null +++ b/tests/data/linux_fbsd-nfs-server-v1.json @@ -0,0 +1,207 @@ +{ +"applications": { + "discovery": { + "applications": [ { + "app_type": "fbsd-nfs-server", + "app_state": "UNKNOWN", + "discovered": "1", + "app_state_prev": null, + "app_status": "", + "app_instance": "" + } ], + "application_metrics": [] + }, + "poller": { + "applications": [ { + "app_type": "fbsd-nfs-server", + "app_state": "OK", + "discovered": "1", + "app_state_prev": "UNKNOWN", + "app_status": "", + "app_instance": "" + } ], + "application_metrics": [ + { + "metric": "Access", + "value": "2756963", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Commit", + "value": "226823", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Create", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Faults", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Fsinfo", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Fsstat", + "value": "108431", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Getattr", + "value": "2131314", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Idem", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Inprog", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Link", + "value": "1250", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Lookup", + "value": "6062252", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Misses", + "value": "20162662", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Mkdir", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Mknod", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Nonidem", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Opsaved", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "PathConf", + "value": "12", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "RdirPlus", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Read", + "value": "8043676", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Readdir", + "value": "221801", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Readlink", + "value": "394", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Remove", + "value": "32375", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Rename", + "value": "31097", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "RetFailed", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Rmdir", + "value": "0", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Setattr", + "value": "43045", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Symlink", + "value": "24", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "Write", + "value": "464478", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "WriteOps", + "value": "464478", + "value_prev": null, + "app_type": "fbsd-nfs-server" + }, + { + "metric": "WriteRPC", + "value": "464478", + "value_prev": null, + "app_type": "fbsd-nfs-server" + } + ] + } +} +} diff --git a/tests/snmpsim/linux_fbsd-nfs-client-legacy.snmprec b/tests/snmpsim/linux_fbsd-nfs-client-legacy.snmprec new file mode 100644 index 0000000000..6aee196845 --- /dev/null +++ b/tests/snmpsim/linux_fbsd-nfs-client-legacy.snmprec @@ -0,0 +1,10 @@ +1.3.6.1.2.1.1.1.0|4|Linux server 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10 +1.3.6.1.2.1.1.3.0|67|77550514 +1.3.6.1.2.1.1.4.0|4| +1.3.6.1.2.1.1.5.0|4| +1.3.6.1.2.1.1.6.0|4| +1.3.6.1.2.1.25.1.1.0|67|77552962 +1.3.6.1.4.1.8072.1.3.2.2.1.21.6.100.105.115.116.114.111|2|1 +1.3.6.1.4.1.8072.1.3.2.2.1.21.13.102.98.115.100.110.102.115.99.108.105.101.110.116|2|1 +1.3.6.1.4.1.8072.1.3.2.3.1.2.13.102.98.115.100.110.102.115.99.108.105.101.110.116|4x|323736363935330a35353233350a373635323435390a3437310a31303132363033370a3538363939320a34393833390a34303833340a33393033390a313633380a34300a300a300a3238393737380a300a333436363738310a300a3133393630380a31340a31320a3238343633300a300a3339330a300a300a32353530303431300a3232303130323434380a333436363738380a3137373538373638330a373633333631340a363733323432330a313038393339340a323430343837340a3538363939390a33353735380a3437310a3330373937360a3235333437340a3131383431330a34310a3138353436343437390a333436363738380a diff --git a/tests/snmpsim/linux_fbsd-nfs-client-v1.snmprec b/tests/snmpsim/linux_fbsd-nfs-client-v1.snmprec new file mode 100644 index 0000000000..b8f6092a5c --- /dev/null +++ b/tests/snmpsim/linux_fbsd-nfs-client-v1.snmprec @@ -0,0 +1,10 @@ +1.3.6.1.2.1.1.1.0|4|Linux server 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10 +1.3.6.1.2.1.1.3.0|67|77550514 +1.3.6.1.2.1.1.4.0|4| +1.3.6.1.2.1.1.5.0|4| +1.3.6.1.2.1.1.6.0|4| +1.3.6.1.2.1.25.1.1.0|67|77552962 +1.3.6.1.4.1.8072.1.3.2.2.1.21.6.100.105.115.116.114.111|2|1 +1.3.6.1.4.1.8072.1.3.2.2.1.21.13.102.98.115.100.110.102.115.99.108.105.101.110.116|2|1 +1.3.6.1.4.1.8072.1.3.2.3.1.2.13.102.98.115.100.110.102.115.99.108.105.101.110.116|4x|7b0a202020226572726f7222203a202230222c0a202020226572726f72537472696e6722203a20226e6673737461742065786974656420776974682030222c0a2020202276657273696f6e22203a20312c0a202020226461746122203a207b0a202020202020224673696e666f22203a20223134222c0a20202020202022526571756573747322203a20223235353030343130222c0a202020202020225265616464697222203a2022323839373738222c0a2020202020202242696f524c4d697373657322203a2022343731222c0a202020202020224c696e6b22203a202231363338222c0a2020202020202242696f444d697373657322203a2022323533343734222c0a2020202020202242696f524c4869747322203a20223335373538222c0a202020202020224d6b64697222203a202230222c0a2020202020202242696f444869747322203a2022333037393736222c0a2020202020202254696d65644f757422203a202230222c0a20202020202022416363734d697373657322203a202233343636373838222c0a20202020202022446972454869747322203a2022313138343133222c0a2020202020202242696f574d697373657322203a2022353836393939222c0a20202020202022436f6d6d697422203a2022323834363330222c0a202020202020224c6b75704869747322203a2022313737353837363833222c0a202020202020224c6b75704d697373657322203a202237363333363134222c0a2020202020202253796d6c696e6b22203a20223430222c0a20202020202022526561646c696e6b22203a2022343731222c0a202020202020225265747269657322203a202230222c0a20202020202022585265706c69657322203a202230222c0a20202020202022526d64697222203a202230222c0a202020202020224c6f6f6b757022203a202237363532343539222c0a20202020202022577269746522203a2022353836393932222c0a2020202020202252646972506c757322203a202230222c0a202020202020225265616422203a20223130313236303337222c0a2020202020202242696f524d697373657322203a202231303839333934222c0a20202020202022446972454d697373657322203a20223431222c0a20202020202022496e76616c696422203a2022333933222c0a20202020202022417474724869747322203a2022323230313032343438222c0a20202020202022416363734869747322203a2022313835343634343739222c0a2020202020202241636365737322203a202233343636373831222c0a202020202020224765746174747222203a202232373636393533222c0a20202020202022417474724d697373657322203a202232373636393431222c0a2020202020202242696f574869747322203a202232343034383734222c0a202020202020224d6b6e6f6422203a202230222c0a2020202020202252656d6f766522203a20223430383334222c0a202020202020225365746174747222203a20223535323335222c0a2020202020202246737374617422203a2022313339363038222c0a2020202020202252656e616d6522203a20223339303339222c0a2020202020202242696f524869747322203a202236373332343233222c0a2020202020202250617468436f6e6622203a20223132222c0a2020202020202243726561746522203a20223439383339220a2020207d0a7d0a diff --git a/tests/snmpsim/linux_fbsd-nfs-server-legacy.snmprec b/tests/snmpsim/linux_fbsd-nfs-server-legacy.snmprec new file mode 100644 index 0000000000..ce3a7ba02c --- /dev/null +++ b/tests/snmpsim/linux_fbsd-nfs-server-legacy.snmprec @@ -0,0 +1,10 @@ +1.3.6.1.2.1.1.1.0|4|Linux server 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10 +1.3.6.1.2.1.1.3.0|67|77550514 +1.3.6.1.2.1.1.4.0|4| +1.3.6.1.2.1.1.5.0|4| +1.3.6.1.2.1.1.6.0|4| +1.3.6.1.2.1.25.1.1.0|67|77552962 +1.3.6.1.4.1.8072.1.3.2.2.1.21.6.100.105.115.116.114.111|2|1 +1.3.6.1.4.1.8072.1.3.2.2.1.21.13.102.98.115.100.110.102.115.115.101.114.118.101.114|2|1 +1.3.6.1.4.1.8072.1.3.2.3.1.2.13.102.98.115.100.110.102.115.115.101.114.118.101.114|4x|323133313331340a34333034350a363036323235320a3339340a383034333637360a3436343437380a300a33323337350a33313039370a313235300a32340a300a300a3232313830310a300a323735363936330a300a3130383433310a300a31320a3232363832330a300a300a300a300a300a32303136323636320a3436343437380a3436343437380a300a diff --git a/tests/snmpsim/linux_fbsd-nfs-server-v1.snmprec b/tests/snmpsim/linux_fbsd-nfs-server-v1.snmprec new file mode 100644 index 0000000000..efbd39e546 --- /dev/null +++ b/tests/snmpsim/linux_fbsd-nfs-server-v1.snmprec @@ -0,0 +1,10 @@ +1.3.6.1.2.1.1.1.0|4|Linux server 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64 +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10 +1.3.6.1.2.1.1.3.0|67|77550514 +1.3.6.1.2.1.1.4.0|4| +1.3.6.1.2.1.1.5.0|4| +1.3.6.1.2.1.1.6.0|4| +1.3.6.1.2.1.25.1.1.0|67|77552962 +1.3.6.1.4.1.8072.1.3.2.2.1.21.6.100.105.115.116.114.111|2|1 +1.3.6.1.4.1.8072.1.3.2.2.1.21.13.102.98.115.100.110.102.115.115.101.114.118.101.114|2|1 +1.3.6.1.4.1.8072.1.3.2.3.1.2.13.102.98.115.100.110.102.115.115.101.114.118.101.114|4x|7b0a202020226572726f7222203a202230222c0a202020226461746122203a207b0a202020202020224765746174747222203a202232313331333134222c0a2020202020202257726974654f707322203a2022343634343738222c0a202020202020224c6f6f6b757022203a202236303632323532222c0a20202020202022496e70726f6722203a202230222c0a2020202020202250617468436f6e6622203a20223132222c0a20202020202022526d64697222203a202230222c0a202020202020224d6b64697222203a202230222c0a202020202020224e6f6e6964656d22203a202230222c0a2020202020202241636365737322203a202232373536393633222c0a202020202020224f70736176656422203a202230222c0a202020202020224964656d22203a202230222c0a202020202020224d6b6e6f6422203a202230222c0a20202020202022436f6d6d697422203a2022323236383233222c0a202020202020224661756c747322203a202230222c0a2020202020202243726561746522203a202230222c0a20202020202022577269746552504322203a2022343634343738222c0a202020202020225365746174747222203a20223433303435222c0a2020202020202246737374617422203a2022313038343331222c0a202020202020224c696e6b22203a202231323530222c0a20202020202022577269746522203a2022343634343738222c0a202020202020225265744661696c656422203a202230222c0a2020202020202252646972506c757322203a202230222c0a2020202020202253796d6c696e6b22203a20223234222c0a20202020202022526561646c696e6b22203a2022333934222c0a202020202020225265616422203a202238303433363736222c0a2020202020202252656e616d6522203a20223331303937222c0a202020202020225265616464697222203a2022323231383031222c0a202020202020224673696e666f22203a202230222c0a202020202020224d697373657322203a20223230313632363632222c0a2020202020202252656d6f766522203a20223332333735220a2020207d2c0a202020226572726f72537472696e6722203a2022222c0a2020202276657273696f6e22203a20310a7d0a