<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:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@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:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
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;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Times New Roman","serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Times New Roman","serif";
        color:#4F81BD;
        font-weight:normal;
        font-style:normal;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Times New Roman","serif";
        color:#4F81BD;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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 bgcolor=white lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:8.0pt;font-family:"Times New Roman","serif";color:#4F81BD'>The permission denied issue was related to incorrectly set permissions against the ‘tmp’ directory. I have corrected that and I can now run the command successfully (test plugin within Centreon). <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt;font-family:"Times New Roman","serif";color:#4F81BD'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt;font-family:"Times New Roman","serif";color:#4F81BD'>The bigger issue I now have is that although the commands (checkcpu, checkdisksize, checkmem and checkuptime) work from a command prompt and within the Centreon test plugin (I sometimes have to run the command twice in quick succession to get results back), when I activate them within Nagios, I get:” UNKNOWN - The WMI query had problems. You might have your username/password wrong or the user's access level is too low. Wmic error text on the next line.”. Any ideas what I could be doing wrong?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt;font-family:"Times New Roman","serif";color:#4F81BD'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt;font-family:"Times New Roman","serif";color:#4F81BD'><o:p> </o:p></span></p><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";color:windowtext;mso-fareast-language:EN-GB'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:EN-GB'> Matthew Jurgens [mailto:nagiosusers@edcint.co.nz] <br><b>Sent:</b> Monday 30 January 2012 22:01<br><b>To:</b> Robert Jackson<br><b>Cc:</b> Nagios Users List<br><b>Subject:</b> rab@walkermartyn.co.uk - Re: [Nagios-users] rab@walkermartyn.co.uk - Re: NRPE/NSClient++ CheckCPU Error? - Email found in subject - Email found in subject<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><br>On 31/01/2012 3:57 AM, Robert Jackson wrote: <o:p></o:p></p><p class=MsoNormal><span style='font-size:8.0pt'>I’m trying out check_wmi_plus at the moment. I’ve got some basic tests working from a command line (namely checkuptime, checkmem and checkdrivesize). All well and good. However my problems start when I try to run checkcpu within a Nagios environment – “UNKNOWN - Permission denied when trying to store the state data. Sometimes this happens if you have been testing the plugin from the command line as a different user to the Nagios process user.” is being displayed. It works just fine from a command line.</span><span style='font-size:8.0pt;font-family:"Times New Roman","serif";color:#4F81BD'>  </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:EN-GB'><br>The error message for that problem is very explicit.<br>The rest of the that message that you didn't paste into your message tells you what you need to do<br>It will say something along the lines of:<br><br>"You will need to change the permissions on the file or remove it. The actual error text is: Can't create /tmp/cwpss_checkcpu_.state"<br><br>Do what it says and you should be ok<br><br><br><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>Also I can’t for the life of me get the checkts –s sessions(2003) working at all “WARNING: Could not correctly parse "customfield" definition in ini file:  (for checkts sessions2003)” is being displayed.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:8.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:EN-GB'><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:EN-GB'>Something might not be quite right with the ini files you have. Try this -<br>1) Try downloading them again, try the command again<br>2) Remove the ini files one at time, running the command after each removal until the error goes away. Leave check_wmi_plus.ini to last as that is the one that contains the checkts checks. This should identify which one has the error.<br>3) Zip/tar them up and send them to me<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:EN-GB'>-- <br></span><span style='font-size:10.0pt;font-family:"Times New Roman","serif";mso-fareast-language:EN-GB'><a href="http://www.smartmon.com.au">Smartmon System Monitoring</a> <br><a href="http://www.smartmon.com.au">www.smartmon.com.au</a> </span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:EN-GB'><o:p></o:p></span></p></div></div><P>************************************************************************ </P>
<P>The information in this internet E-mail is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is unauthorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of Walker Martyn Ltd or any of its affiliates. If you are not the intended recipient please contact <A href="mailto:administrator@walkermartyn.co.uk">administrator@walkermartyn.co.uk</A>.</P>
<P>Walker Martyn Ltd, company number SC197533. Company is registered in Scotland and has its registered office at 1 Park Circus Place, Glasgow G3 6AH, UK.</P>
<P>**************************************************************** </P><A title="gfidisc.walkermartyn.co.uk" href="#">  </A></body></html>