Skip to content
/ swanmon Public

A small strongswan monitor tool to retrieve runtime data as json via the srongswan davici library.

License

Notifications You must be signed in to change notification settings

TDT-AG/swanmon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swanmon

swanmon is a small strongswan monitoring tool to retrieve runtime data as json via the davici library.

Usage

Available commands can be found with

$ swanmon help

Currently only commands without user input are supported.

Response Format

swanmon directly outputs the response values from the corresponding vici command as "data" (see list of vici commands), where streamed events are joined as an array.

{"errors":[],"data":{}}

streamed command response:

{"errors":[],"data":[]}

Errors are output with the "errors" key. There may technically be mulitple errors for the same command.

{"errors":[{"message":"..."}],"data":[]}

Example Responses

$ swanmon version
{"errors":[],"data":{"daemon":"charon","version":"5.9.11","sysname":"Linux","release":"5.15.135","machine":"mips"}}
$ swanmon list-conns
{"errors":[],"data":[{"test_connection":{"local_addrs":["%any"],"remote_addrs":["172.16.0.2"],"version":"IKEv1\/2","reauth_time":"10260","rekey_time":"0","unique":"UNIQUE_NO","dpd_timeout":"150","local-1":{"class":"pre-shared key","groups":[],"cert_policy":[],"certs":[],"cacerts":[]},"remote-1":{"class":"pre-shared key","id":"172.16.0.2","groups":[],"cert_policy":[],"certs":[],"cacerts":[]},"children":{"test_connection":{"mode":"TUNNEL","rekey_time":"3060","rekey_bytes":"0","rekey_packets":"0","dpd_action":"none","close_action":"none","local-ts":["192.168.100.0\/24"],"remote-ts":["192.168.101.0\/24"]},"another_test_connection":{"mode":"TUNNEL","rekey_time":"3060","rekey_bytes":"0","rekey_packets":"0","dpd_action":"none","close_action":"none","local-ts":["192.168.100.0\/24"],"remote-ts":["192.168.101.0\/24"]}}}}]}

strongswan not started

{"errors":[{"message":"Connecting failed: Connection refused"}],"data":[]}

About

A small strongswan monitor tool to retrieve runtime data as json via the srongswan davici library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published