monitor printer from Windows server
Werner, Robert
RWerner at pomwonderful.com
Thu Dec 1 20:52:14 CET 2011
I've had good luck using System.Printing from Powershell and then running the scripts from NSClient++.
I just wrote the PowerShell Scripts to use the standard nagios plugin status codes.
I used the following links to develop the PowerShell scripts:
http://gallery.technet.microsoft.com/scriptcenter/PrintServerManagementps1-7676ed28
http://msdn.microsoft.com/en-us/library/system.printing.aspx
If there is interest, I'll ask my boss about sharing the PowerShell scripts.
--
Robert G. Werner
Oracle Apps Systems Administrator
rwerner at pomwonderful.com
559.521.5089
From: Claudio Kuenzler [mailto:ck at claudiokuenzler.com]
Sent: Thursday, December 01, 2011 11:21 AM
To: Nagios Users List
Subject: Re: [Nagios-users] monitor printer from Windows server
Besides of course the Spooler Service, you should also monitor the Windows Event Log.
I've experienced a lot of driver issues on an old Windows print server which temporarily caused the affected printer(s) to appear as 'offline'. Such problems appeared in the event log as Warnings with the message content something about the driver. That was on a Windows Server 2003, but I think such driver problems are still logged to the Event Log.
On Thu, Dec 1, 2011 at 3:10 PM, Jim Avery <jim at jimavery.me.uk<mailto:jim at jimavery.me.uk>> wrote:
On 1 December 2011 12:39, James Osbourn <james.osbourn at citrix.com<mailto: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<mailto: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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20111201/cb2f8105/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
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