跳转到主内容

Active IQ 统一管理器无法在上运行警报脚本 包含与号的对象名称

Views:
10
Visibility:
Public
Votes:
0
Category:
active-iq-unified-manager
Specialty:
om
Last Updated:

适用于

  • OnCommand Unified Manager 9.5P1 ( UM )
  • Active IQ Unified Manager 9.6P1 ( AIQUM )
  • Active IQ Unified Manager 9.7P1 ( AIQUM )

注意:可能存在于其他版本的 Unified Manager 中。

问题

如果您发现自定义脚本未执行,并且相关对象的对象名称中包含与号,则可能会遇到此问题。以下输出 ocum-script.log 显示了对 "qtree 空间接近全满 " 事件执行失败。

2020-11-03 03:50:47 [DEBUG] [default task-5] [ScriptPlugin:30] - Processing the rest request for script plugin. Event ID : 12
2020-11-03 03:50:48 [INFO ] [ScriptExecutor-7] [AlertScriptService:259] - Detecting command for file : testBP.ps1
2020-11-03 03:50:48 [DEBUG] [ScriptExecutor-7] [AlertScriptService:179] - ------ Script Arguments BEGIN------
2020-11-03 03:50:48 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  Qtree Space Nearly Full, out string = Qtree Space Nearly Full 
2020-11-03 03:50:48 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  svm1:/testvol/test&qtree, out string = svm1:`/testvol`/test&qtree 
2020-11-03 03:50:48 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  0, out string = 0 
2020-11-03 03:50:48 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  1, out string = 1 
2020-11-03 03:50:48 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  1992296, out string = 1992296 
2020-11-03 03:50:48 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  0, out string = 0 
2020-11-03 03:50:48 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  0.0, out string = 0`.0 
2020-11-03 03:50:50 [DEBUG] [ScriptExecutor-7] [AlertScriptService:186] - -eventID : 12 
 -eventName : Qtree Space Nearly Full 
 -eventSeverity : warning 
 -eventSourceID : 785 
 -eventSourceName : svm1:`/testvol`/test&qtree 
 -eventSourceType : QTREE 
 -eventState : NEW 
 -eventArgs : qtreeSpaceNearlyFullThreshold=0,qtreeSpaceFullThreshold=1,diskKbytesLimit=1992296,diskKbytesUsed=0,diskKbytesUsedPercent=0`.0 
 
2020-11-03 03:50:50 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  Qtree Space Nearly Full, out string = Qtree Space Nearly Full 
2020-11-03 03:50:50 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  svm1:/testvol/test&qtree, out string = svm1:`/testvol`/test&qtree 
2020-11-03 03:50:50 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  0, out string = 0 
2020-11-03 03:50:50 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  1, out string = 1 
2020-11-03 03:50:50 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  1992296, out string = 1992296 
2020-11-03 03:50:50 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  0, out string = 0 
2020-11-03 03:50:50 [DEBUG] [ScriptExecutor-7] [AlertScriptService:236] - Escaped String: in string =  0.0, out string = 0`.0 
2020-11-03 03:50:50 [DEBUG] [ScriptExecutor-7] [AuthenticationUtils:73] - Successfully logged in for script execution.
2020-11-03 03:50:51 [INFO ] [ScriptExecutor-7] [AlertScriptService:108] - Script execution of file : testBP.ps1 for EventID : 12 in progress..
At line:1 char:183
+ ... ing -eventSourceID 785 -eventSourceName svm1:`/testvol`/test&qtree -e ...
+                                  ~
The ampersand (&) character is not allowed. The & operator is reserved for 
future use; wrap an ampersand in double quotation marks ("&") to pass it as 
part of a string.
   + CategoryInfo      : ParserError: (:) [], ParentContainsErrorRecordEx 
  ception
   + FullyQualifiedErrorId : AmpersandNotAllowed

在此示例中,我们将测试一个 qtree 。PowerShell 无法处理与号。通过我们的测试,我们知道 qtree 和 CIFS 共享都可能发生此问题,但其他对象可能存在此问题。

 

CUSTOMER EXCLUSIVE CONTENT

Registered NetApp customers get unlimited access to our dynamic Knowledge Base.

New authoritative content is published and updated each day by our team of experts.

Current Customer or Partner?

Sign In for unlimited access

New to NetApp?

Learn more about our award-winning Support