

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Guys,
I am working on an integration where I want to forward alerts from nnmi using action tab. Where I was trying to execute a powershell command. I checked the action log where it says it executed the powershell successfully but the action was never performed. When I manually executed the script it worked as expected. I am not sure what is missing here.
Powershell script is placed under actions folder.
Example: mypowershellscript.ps1 $ssn
Jul 17, 2019 3:59:30.149 PM [ThreadID:12] FINE: com.hp.ov.nms.events.action.log.ActionLogger addToProcessList: Command: ""mypowershellscript.ps1" "Received cbgpFsmStateChange from xxxx (Enterprise : .1.3.6.1.4.1.9.9.187.0.1 , Event forwarded from : \"Invalid or unknown cia cia.remotemgr\" ) at Wed Jul 17 15:59:19 EDT 2019 with 7 parameters, Severity : Critical , Parameters : bgpPeerLastError= , bgpPeerState=1, cbgpPeerLastErrorTxt=hold time expired, cbgpPeerPrevState=3" "Critical" "xxxxxx" "Wed Jul 17 15:59:19 EDT 2019" "x.x.x.x""; Started at Wed Jul 17 15:59:30 EDT 2019; Incident Name: cbgpFsmStateChange; Incident UUID: 5d6a26a1-d8f4-4f82-8274-bc132c3c193f; Command Type: ScriptOrExecutable; Lifecycle state: com.hp.nms.incident.lifecycle.Registered; Exit Code: 0; Standard Output: null; Standard Error: null; Execution Status: null; Ran for 0 milliseconds
Jul 17, 2019 3:59:30.149 PM [ThreadID:12] FINE: com.hp.ov.nms.events.action.log.ActionLogger addToProcessList:
*******************************************************************************
Command: ""mypowershellscript.ps1" "Received cbgpFsmStateChange from xxxx (Enterprise : .1.3.6.1.4.1.9.9.187.0.1 , Event forwarded from : \"Invalid or unknown cia cia.remotemgr\" ) at Wed Jul 17 15:59:19 EDT 2019 with 7 parameters, Severity : Critical , Parameters : bgpPeerLastError= , bgpPeerState=1, cbgpPeerLastErrorTxt=hold time expired, cbgpPeerPrevState=3" "Critical" "xxxx" "Wed Jul 17 15:59:19 EDT 2019" "x.x.x.x""
Started at 7/17/19 3:59 PM
Incident Name: cbgpFsmStateChange
Incident UUID: 5d6a26a1-d8f4-4f82-8274-bc132c3c193f
Command Type: ScriptOrExecutable
Lifecycle state: com.hp.nms.incident.lifecycle.Registered
Exit Code: 0
Standard Output: null
Standard Error: null
Execution Status: null
Ran for 0 milliseconds
*******************************************************************************
Regards,
Naresh
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Looks like NNMi does not support Powershell and we have only 2 options either use BAT script or jython script. It is disappointing that thins amazing application does not support powershell on windows environment.
I am closing this thread now. If I find another way to execute will post the solution to this thread.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Could someone please let me know how to call a PowerShell under nnmi action where I can pass the variables.
Regards,
Naresh


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
- This community was super active when it was part of HP now it is gone. Looks like all NNMi Guru's are gone.
Regards,
Naresh


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello Naresh,
it might be a special problem with your question as no one is using powershell ;-).
I have successful used Windows Batch (.bat) and OV Perl (.ovpl) without a problem (mainly OV Perl as it is delievered by NNMi).
BR Allessandro


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Since we have NNMi installed on a Windows Box I was expecting PowerShell to be the right option to be called for sending alerts to 3rd party applications. Now I am using Bat file to call the PowerShell to forward the alerts, which is working fine for some time, then stops executing NNMi action for incidents. I have restart NNMi application to work again.
The strange part is, logs do not show any issue on the script and I am not sure why it runs for a day and then it stops executing actions against the incident.
Regards,
Naresh


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Looks like NNMi does not support Powershell and we have only 2 options either use BAT script or jython script. It is disappointing that thins amazing application does not support powershell on windows environment.
I am closing this thread now. If I find another way to execute will post the solution to this thread.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The issue to fix nnmi action is provided on the following link .