Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strongswan-connection: Monitor only certain connections #738

Open
stefanhart opened this issue Jan 22, 2024 · 1 comment
Open

strongswan-connection: Monitor only certain connections #738

stefanhart opened this issue Jan 22, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@stefanhart
Copy link

Describe the solution you'd like

An additional arg, eg --monitor-conns, to monitor not all possible connection but only specified connection. Also the output and perfdata should only present the relevant data.
For example I ve configured a VPN-GW with two Site-to-Site-Peers and a couple of different Remote-Access-Connections.
I like to monitor each site with a specific Icinga service and not the remote access connections.
eg.
vars.by_ssh["strongswan vpn conns Site XY"] = { by_ssh_command = [ "/usr/local/lib/monitoring/plugins/check_strongswan_conn" ],
by_ssh_arguments = { "--socket=/var/run/charon.vici" = "", "--monitor-conns" = "S2S_SITE-XY_IKE2-AUTHN-PUBKEY" } }

Additional context

parser.add_argument(
    '--monitor-conns', dest='MONITOR_CONNECTION_KEYS', action='extend', nargs='+', type=str, default=DEFAULT_MONITOR_CONNECTION_KEYS, 
    help='Connections to be monitored.'
)

... for key in monitor_connection_keys: ...

@stefanhart stefanhart added the enhancement New feature or request label Jan 22, 2024
@markuslf
Copy link
Member

Nice suggestion, makes sense.

@markuslf markuslf self-assigned this Jan 22, 2024
@markuslf markuslf changed the title [strongswan-connection: ] Monitor only certain connections strongswan-connection: Monitor only certain connections Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants