Hi.
I am looking for a way to monitor USB device i.e NFC card readers and POS receipt printers on Windows 7 computers.
I want to check whether the device are connected or disconnected.
Thanks
USB Device monitoring
Re: USB Device monitoring
Do you have an agent installed on the Windows computers? You could monitor USBs via NCPA. Here's an example of a check, run from the command line:
Here's our documentation on NCPA: https://www.nagios.org/ncpa/help.php
There is one thing that you need to keep in mind - when the USB is ejected, the check will return UNKNOWN instead of CRITICAL. Example:
If this is an issue for you, you could always use the negate plugin to change the output:
For more information on the negate plugin, please review our documentation on the topic here:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
As far as the POS receipt printers, they could be probably monitored via SNMP (if available).
Hope this helps.
Code: Select all
[root@main-nagios-xi libexec]# /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'mytoken' -P 5693 -M 'disk/logical/F:|/used_percent' -w 70 -c 90
OK: Used_percent was 14.20 % | 'used_percent'=14.20%;70;90;
[root@main-nagios-xi libexec]# echo $?
0There is one thing that you need to keep in mind - when the USB is ejected, the check will return UNKNOWN instead of CRITICAL. Example:
Code: Select all
[root@main-nagios-xi libexec]# /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'mytoken' -P 5693 -M 'disk/logical/F:|/used_percent' -w 70 -c 90
The node (F:|) requested does not exist.
[root@main-nagios-xi libexec]# echo $?
3Code: Select all
[root@main-nagios-xi libexec]# /usr/local/nagios/libexec/negate -u CRITICAL -s /usr/local/nagios/libexec/check_ncpa.py -H x.x.x.x -t 'mytoken' -P 5693 -M 'disk/logical/F:|/used_percent' -w 70 -c 90
The node (F:|) requested does not exist.
[root@main-nagios-xi libexec]# echo $?
2https://assets.nagios.com/downloads/nag ... ios-XI.pdf
As far as the POS receipt printers, they could be probably monitored via SNMP (if available).
Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!