Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.26 KB | None | 0 0
  1. check_wmi_plus.pl -H HOST -u USER -p PASS -m checkcpu -d
  2.  
  3. Creating '_AvgCPU' (WMIQuery:1, Row:0) using 'PERF_100NSEC_TIMER_INV' (Parameters: PercentProcessorTime,%.2f,100)
  4. WARNING: The value in the requested field (PercentProcessorTime) does not look like a number - we got ''
  5. Setting _AvgCPU to CALC_FAIL
  6.  
  7. pi@raspberrypi:~ $ /usr/local/nagios/libexec/check_wmi_plus.pl -H
  8. > 192.168.1.10 -u ***** -p ***** -m checkcpu -d Command Line (v1.61):
  9. > /usr/local/nagios/libexec/check_wmi_plus.pl -H 192.168.1.10 -u USER -p
  10. > PASS -m checkcpu -d Base Dir: /usr/local/nagios/libexec Conf File Dir:
  11. > /etc/check_wmi_plus Loaded Conf File
  12. > /etc/check_wmi_plus/check_wmi_plus.conf
  13. > WMI Ini Dir: /etc/check_wmi_plus/check_wmi_plus.d
  14. > Starting Keep State Mode
  15. > STATE FILE: /tmp/cwpss_checkcpu__192168110___.state
  16. > Checking previous data's expiry - Timestamp 1483456739 vs Expiry After
  17. > 1483453146 (Keep State Expiry setting is 3600sec) Using Existing WMI
  18. > DATA
  19. > of:$VAR1 = [
  20. > [
  21. > {
  22. > '_ChecksOK' => 1,
  23. > '_KeepStateCreateTimestamp' => 1483456739,
  24. > '_ItemCount' => 0
  25. > }
  26. > ]
  27. > ];
  28. > Round #2 of 2
  29. > QUERY: /usr/bin/wmic '-U' 'USER%PASS' '--namespace' 'root/cimv2'
  30. > '//192.168.1.10' 'select PercentProcessorTime,Timestamp_Sys100NS from
  31. > Win32_PerfRawData_PerfOS_Processor where Name="_Total"'
  32. > OUTPUT:
  33. > WMI DATA:$VAR1 = [
  34. > [
  35. > {
  36. > '_KeepStateCreateTimestamp' => 1483456739,
  37. > '_ItemCount' => 0,
  38. > '_ChecksOK' => 2,
  39. > '_KeepStateSamplePeriod' => 7
  40. > }
  41. > ],
  42. > [
  43. > {
  44. > '_ItemCount' => 0
  45. > }
  46. > ]
  47. > ];
  48. > Storing new WMI results in the state file $VAR1 = [
  49. > [
  50. > {
  51. > '_ItemCount' => 0
  52. > }
  53. > ]
  54. > ];
  55. > Copying predefined fields to the last WMI result set [0] to [1] NEW
  56. > WMI
  57. > DATA:$VAR1 = [
  58. > [
  59. > {
  60. > '_ItemCount' => 0
  61. > }
  62. > ],
  63. > [
  64. > {
  65. > '_ItemCount' => 0,
  66. > '_KeepStateCreateTimestamp' => 1483456739,
  67. > '_ChecksOK' => 2,
  68. > '_KeepStateSamplePeriod' => 7
  69. > }
  70. > ]
  71. > ];
  72. > Creating '_AvgCPU' (WMIQuery:1, Row:0) using 'PERF_100NSEC_TIMER_INV'
  73. > (Parameters: PercentProcessorTime,%.2f,100)
  74. > WARNING: The value in the requested field (PercentProcessorTime) does
  75. > not look like a number - we got ''
  76. > Setting _AvgCPU to CALC_FAIL
  77. > Testing TEST VALUES $VAR1 = {
  78. > '_ItemCount' => 0,
  79. > '_KeepStateCreateTimestamp' => 1483456739,
  80. > '_AvgCPU' => 'CALC_FAIL',
  81. > '_ChecksOK' => 2,
  82. > '_KeepStateSamplePeriod' => 7
  83. > };
  84. > WARNING SPECS: $VAR1 = undef;
  85. > CRITICAL SPECS: $VAR1 = undef;
  86. > ------------ Critical Check ------------
  87. > ------------ Warning Check ------------
  88. > ------------ End Check ------------
  89. > Data Passed back from check: $VAR1 = {
  90. > '_DisplayMsg' => 'OK (Sample Period 7 sec)',
  91. > '_KeepStateSamplePeriod' => 7,
  92. > '_KeepStateCreateTimestamp' => 1483456739,
  93. > '_TestResult' => 0,
  94. > '_Triggers' => '',
  95. > '_AvgCPU' => 'CALC_FAIL',
  96. > '_ChecksOK' => 2,
  97. > '_ItemCount' => 0,
  98. > '_StatusType' => 'OK (Sample Period 7 sec)'
  99. > };
  100. > ---------- Building Up Display
  101. > Incoming Data $VAR1 = {
  102. > '_nodatamode' => '',
  103. > '_delay' => 7,
  104. > '_timeout' => '',
  105. > '_KeepStateSamplePeriod' => 7,
  106. > '_KeepStateCreateTimestamp' => 1483456739,
  107. > '_arg5' => undef,
  108. > '_savedbytefactor' => '',
  109. > '_arg1' => '',
  110. > '_StatusType' => 'OK (Sample Period 7 sec)',
  111. > '_mode' => 'checkcpu',
  112. > '_arg4' => undef,
  113. > '_DisplayMsg' => 'OK (Sample Period 7 sec)',
  114. > '_submode' => '',
  115. > '_arg3' => '',
  116. > '_TestResult' => 0,
  117. > '_host' => '192.168.1.10',
  118. > '_nodatastring' => 'WMI Query returned no data. The item
  119. > you were looking for may NOT exist or the software that creates the
  120. > WMI Class may not be running, or all data has been excluded.
  121. > ',
  122. > '_arg2' => '',
  123. > '_Triggers' => '',
  124. > '_AvgCPU' => 'CALC_FAIL',
  125. > '_ChecksOK' => 2,
  126. > '_bytefactor' => 1024,
  127. > '_truncate_output' => 8192,
  128. > '_ItemCount' => 0,
  129. > '_nodataexit' => ''
  130. > };
  131. > ------- Processing _DisplayMsg||~|~| - || Complex
  132. > Format:_DisplayMsg,,~,~, - ,, _DisplayMsg||~|~| - || ----> OK (Sample
  133. > Period 7 sec) -
  134. > ------- Processing _AvgCPU|%|Average CPU Utilisation| |~|| Complex
  135. > Format:_AvgCPU,%,Average CPU Utilisation, ,~,, _AvgCPU|%|Average CPU
  136. > Utilisation| |~|| ----> Average CPU Utilisation CALC_FAIL%
  137. > ---------- Building Up Performance Data
  138. > ------- Processing _AvgCPU|%|Avg CPU Utilisation Complex
  139. > Format:_AvgCPU,%,Avg CPU Utilisation Ignoring perf data since it is
  140. > not numeric
  141. > ---------- Done
  142. > OUT:OK (Sample Period 7 sec) - Average CPU Utilisation CALC_FAIL%
  143. >
  144. > OK (Sample Period 7 sec) - Average CPU Utilisation CALC_FAIL%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement