monitor printer from Windows server
Jim Avery
jim at jimavery.me.uk
Thu Dec 1 15:10:37 CET 2011
On 1 December 2011 12:39, James Osbourn <james.osbourn at citrix.com> wrote:
> I have a Windows 7 server acting as a print server and I would like to check the status of these printers and make sure that they are still online etc.
>
> I cannot seem to find a way of checking printers shared from a Windows machine, does anyone have any suggestions or references that I could use.
>
> Thanks
>
> James
I query the windows performance counter for number of print jobs
spooling. If a printer breaks then usually this counter starts
ramping up quite rapidly as more and more print jobs get stuck in the
queue.
For example, the [external alias] section of your nsc.ini (assuming
you use NSClient++), you can have:-
alias_CheckCounter-PrintQJobs=CheckCounter "Counter:jobs=\Print
Queue(_Total)\Jobs" ShowAll MaxWarn=250 MaxCrit=500
Then your service definition would look something like this:-
define service {
host_name printserver1,printserver2
service_description PrintQJobs
use srv-pnp,generic-service
check_command check_nrpe!-c PrintQJobs
max_check_attempts 6
check_interval 15
retry_interval 5
contact_groups notify-admins
notes Records the number of Active
Jobs on a Print Server
register 1
}
And the command definition I use is just a generic one for any nrpe
check like so:-
define command {^M
command_name check_nrpe
command_line $USER1$/check_nrpe -H
$HOSTADDRESS$ -u $ARG1$
register 1
}
Our servers aren't quite as recent as Windows 7, but I guess the
counter would still be the same.
I hope that helps.
Jim
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list