Giter VIP home page Giter VIP logo

Comments (3)

alagoutte avatar alagoutte commented on June 19, 2024

Hi,

There is actually no cmdlet for monitoring info but you can try

PS > (Invoke-FGTRestMethod api/v2/monitor/vpn/ipsec).results

but not sure if there is all info (i can't try, i don't have dial up IPsec VPN)

FYI for VPN SSL, there is info :

PS > (Invoke-FGTRestMethod api/v2/monitor/vpn/ssl/stats).results

conserve_mode max                                   current
------------- ---                                   -------
        False @{users=4; tunnels=4; connections=17} @{users=3; tunnels=3; connections=3}

 PS >  (Invoke-FGTRestMethod api/v2/monitor/vpn/ssl).results

index                : 0
user_name            : alagoutte
remote_host          : 192.2.0.1
last_login_time      : Thu Mar 26 16:31:10 2020
last_login_timestamp : 1585236670
subsessions          : {@{index=1; parent_index=0; mode=Tunnel; type=Unknown; aip=10.200.250.1; in_bytes=121297;
                       out_bytes=176457; desthost=}}
subsession_type      : Unknown
subsession_desc      : aip:10.200.250.1

index                : 1
user_name            : user1
remote_host          : 192.2.0.2
last_login_time      : Thu Mar 26 18:33:30 2020
last_login_timestamp : 1585244010
subsessions          : {@{index=2; parent_index=1; mode=Tunnel; type=Unknown; aip=10.200.250.2; in_bytes=264932;
                       out_bytes=162526; desthost=}}
subsession_type      : Unknown
subsession_desc      : aip:10.200.250.2

index                : 2
user_name            : user3
remote_host          : 192.2.0.3
last_login_time      : Thu Mar 26 19:34:58 2020
last_login_timestamp : 1585247698
subsessions          : {@{index=3; parent_index=2; mode=Tunnel; type=Unknown; aip=10.200.250.3; in_bytes=42305;
                       out_bytes=88058; desthost=}}
subsession_type      : Unknown
subsession_desc      : aip:10.200.250.3

from powerfgt.

Cool34000 avatar Cool34000 commented on June 19, 2024

Hi,

You can use this:
(Invoke-FGTRestMethod -uri api/v2/monitor/vpn/ipsec/select | select -ExpandProperty results | Where-Object { $_.parent -eq "DialUpVPN_Name" }).count

Simply change the name of your VPN DialUp!

from powerfgt.

Cool34000 avatar Cool34000 commented on June 19, 2024

Also, If you want stats, you can remove the ".count" at the end of the command:

Invoke-FGTRestMethod -uri api/v2/monitor/vpn/ipsec/select | select -ExpandProperty results | Where-Object { $_.parent -eq "AgencesXXX" }

proxyid          : {@{proxy_src=System.Object[]; proxy_dst=System.Object[]; status=up; p2name=AgencesXXX; p2serial=6; expire=22098; incoming_bytes=6700940; outgoing_bytes=8528150}}
name             : AgencesXXX_0
parent           : AgencesXXX
comments         :
wizard-type      : custom
connection_count : 37
creation_time    : 2853730
type             : dialup
incoming_bytes   : 100365986
outgoing_bytes   : 190013198
rgwy             : x.x.x.x
dialup_index     : 0

proxyid          : {@{proxy_src=System.Object[]; proxy_dst=System.Object[]; status=up; p2name=AgencesXXX; p2serial=1; expire=19267; incoming_bytes=147396; outgoing_bytes=175500}}
name             : AgencesXXX_1
parent           : AgencesXXX
comments         :
wizard-type      : custom
connection_count : 20
creation_time    : 1707688
type             : dialup
incoming_bytes   : 95245694
outgoing_bytes   : 492716106
rgwy             : x.x.x.x
dialup_index     : 5

proxyid          : {@{proxy_src=System.Object[]; proxy_dst=System.Object[]; status=up; p2name=AgencesXXX; p2serial=1; expire=22146; incoming_bytes=9059632; outgoing_bytes=28578140}}
name             : AgencesXXX_2
parent           : AgencesXXX
comments         :
wizard-type      : custom
connection_count : 6
creation_time    : 450039
type             : dialup
incoming_bytes   : 107147958
outgoing_bytes   : 492447404
rgwy             : x.x.x.x
dialup_index     : 13

from powerfgt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.