<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Robert,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This sounds like the kind of thing that I am interested in.  I have not done any powershell scripting before so would be very interested in seeing what you have if you are able to release it; as well as your integration with NSClient and Nagios.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>James<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Werner, Robert [mailto:RWerner@pomwonderful.com] <br><b>Sent:</b> 01 December 2011 19:52<br><b>To:</b> Nagios Users List<br><b>Subject:</b> Re: [Nagios-users] monitor printer from Windows server<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I’ve had good luck using System.Printing from Powershell and then running the scripts from NSClient++.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I just wrote the PowerShell Scripts to use the standard nagios plugin status codes.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I used the following links to develop the PowerShell scripts:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://gallery.technet.microsoft.com/scriptcenter/PrintServerManagementps1-7676ed28">http://gallery.technet.microsoft.com/scriptcenter/PrintServerManagementps1-7676ed28</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="http://msdn.microsoft.com/en-us/library/system.printing.aspx">http://msdn.microsoft.com/en-us/library/system.printing.aspx</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If there is interest,  I’ll ask my boss about sharing the PowerShell scripts.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>--<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Robert G. Werner<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Oracle Apps Systems Administrator<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><a href="mailto:rwerner@pomwonderful.com">rwerner@pomwonderful.com</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>559.521.5089<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Claudio Kuenzler <a href="mailto:[mailto:ck@claudiokuenzler.com]">[mailto:ck@claudiokuenzler.com]</a> <br><b>Sent:</b> Thursday, December 01, 2011 11:21 AM<br><b>To:</b> Nagios Users List<br><b>Subject:</b> Re: [Nagios-users] monitor printer from Windows server<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>Besides of course the Spooler Service, you should also monitor the Windows Event Log. <br>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.<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-US>On Thu, Dec 1, 2011 at 3:10 PM, Jim Avery <<a href="mailto:jim@jimavery.me.uk">jim@jimavery.me.uk</a>> wrote:<o:p></o:p></span></p><div><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>On 1 December 2011 12:39, James Osbourn <<a href="mailto:james.osbourn@citrix.com">james.osbourn@citrix.com</a>> wrote:<br>> 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.<br>><br>> 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.<br>><br>> Thanks<br>><br>> James<br><br><o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US>I query the windows performance counter for number of print jobs<br>spooling.  If a printer breaks then usually this counter starts<br>ramping up quite rapidly as more and more print jobs get stuck in the<br>queue.<br><br>For example, the [external alias] section of your nsc.ini (assuming<br>you use NSClient++), you can have:-<br><br>alias_CheckCounter-PrintQJobs=CheckCounter "Counter:jobs=\Print<br>Queue(_Total)\Jobs" ShowAll MaxWarn=250 MaxCrit=500<br><br>Then your service definition would look something like this:-<br><br>define service {<br>       host_name                       printserver1,printserver2<br>       service_description             PrintQJobs<br>       use                             srv-pnp,generic-service<br>       check_command                   check_nrpe!-c PrintQJobs<br>       max_check_attempts              6<br>       check_interval                  15<br>       retry_interval                  5<br>       contact_groups                  notify-admins<br>       notes                           Records the number of Active<br>Jobs on a Print Server<br>       register                        1<br>}<br><br>And the command definition I use is just a generic one for any nrpe<br>check like so:-<br><br>define command {^M<br>       command_name                    check_nrpe<br>       command_line                    $USER1$/check_nrpe -H<br>$HOSTADDRESS$ -u $ARG1$<br>       register                        1<br>}<br><br>Our servers aren't quite as recent as Windows 7, but I guess the<br>counter would still be the same.<br><br>I hope that helps.<br><span style='color:#888888'><br>Jim</span><o:p></o:p></span></p><div><div><p class=MsoNormal><span lang=EN-US><br>------------------------------------------------------------------------------<br>All the data continuously generated in your IT infrastructure<br>contains a definitive record of customers, application performance,<br>security threats, fraudulent activity, and more. Splunk takes this<br>data and makes sense of it. IT sense. And common sense.<br><a href="http://p.sf.net/sfu/splunk-novd2d" target="_blank">http://p.sf.net/sfu/splunk-novd2d</a><br>_______________________________________________<br>Nagios-users mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>::: Messages without supporting info will risk being sent to /dev/null<o:p></o:p></span></p></div></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></div></body></html>