Closed vTechworld closed 7 years ago
Hi, it is because you need to get Ipsec Statistics and it is a another API call and it is not available for the moment...
Hi, Thank you very much for update.
Could you please let me know where I need to add this command. Or if you have script Please share me (Get-NsxEdge edge01 | Get-NsxIPsecStats).siteStatistics.tunnelStats
You need to wait this PR #354 will be merged (or you can try to use My https://github.com/alagoutte/powernsx/tree/Add-Get-NsxIPsecStats )
Hi,
I am able to get the Get-NsxIPsecStats command. But the problem what I faced here the command is not giving any result.
(Get-NsxEdge "edge-51" | Get-NsxIPsecStats).siteStatistics.ikeStatus
This is the command I executed and there is not result.
Could you please help me on this.
Thank you,
Hi Alexis La Goutte,
I am able to get the output of the scripts. the problem what I done is instated of checking each IPsec I was checking multiple edge due that is not able to show the result.
I changed it to single VPN IPsec and able to get the result of both ikestatus and tunnelstatus
Thank you very much for helping me the get the result.
Thank you Thank you. :+1: :+1: :+1: :100:
Happy to work on POWERNSX
Need to merge the code now :-) (need to finish my test..)
You need to wait this PR #354 will be merged (or you can try to use My https://github.com/alagoutte/powernsx/tree/Add-Get-NsxIPsecStats )
I need some help to install your branch of PowerNSX which contains Get-NsxIPsecStats. Could you please provide the steps to install this and run? I have been trying to run your branch but it isn't working. The cmdlet shows that:
Hi @waliapulkit Do you have re import the module? (and -force for reload)
Hi @waliapulkit Do you have re import the module? (and -force for reload)
Hi @alagoutte , I tried re import module with -force as well, still it doesn't seem to be working. Looks like my enviroment is mixed up with vmware branch and your branch, I will clean up everything once.
I will appreciate if you can provide a step by step documentation process to access and use your branch.
Thanks.
@waliapulkit the better is will be my patch merged directly...
for use my patch you need to clone my repo, go on the branch
git checkout Add-Get-NsxIPsecStats
and manually import module :
import-module ./module/PowerNSX.psm1
@alagoutte
Thanks, I will try this.
I was trying this instead:
$Branch="Add-Get-NsxIPsecStats";$url="https://raw.githubusercontent.com/alagoutte/powernsx/$Branch/PowerNSXInstaller.ps1"; try { $wc = new-object Net.WebClient;$scr = try { $wc.DownloadString($url)} catch { if ( $.exception.innerexception -match "(407)") { $wc.proxy.credentials = Get-Credential -Message "Proxy Authentication Required"; $wc.DownloadString($url) } else { throw $ }}; $scr | iex } catch { throw $_ }
and working ?
the other solution should @nmbradford @dcoghlan merge the patch :-)
I could do that with below blog.
https://vcloudnotes.blogspot.com/2019/10/how-to-get-ipsec-vpn-tunnel-stats-for.html
My patch is now merged... (but there is no yet new release of PowerNSX...)
hopefully you found it useful.
HI All,
Need help in getting the NSX IP sec Statistics using script.
I am able to get the status up to VPN using this command but not able to get the IPsec VPN Statistics as per the attached screen shot.
$nsxvpnedge = Get-NsxEdge | where {$_.Name -match ("vpn")} $nsxvpnedge.features.ipsec.sites.site
Please help me in getting this.
Thank you Nandeesh M