Skip to content

Files

Latest commit

author
Jakob Antonsson
Sep 19, 2018
3d6cbae · Sep 19, 2018

History

History

datadog

OpenVPN Monitor data to DataDog

Summary

Simple python script that uses the management console in Openvpn, queries every 60 seconds and sends to DataDog. Tails OpenVPN log file for Login and Login Failures and send to DataDog as events.

DataDog screenshots

Overview

Overview

Timeboard

§Timeboard

Install

Python, add datadog and pygtail

pip install datadog
pip install pygtail

Update add_dashboard.sh and runovpnmonitor.sh, add DataDog api_key and app_key :

# Edit runovpnmonitor.sh and add keys
export DD_APP_KEY=
export DD_API_KEY=
# edit add_dashboards.sh and add keys
api_key=
app_key=

Configure OpenVPN

Enable management console, add to the openvpn server config.

```shell

management 127.0.0.1 5555


## Run the monitor for ever:

```shell
./runovpnmonitor.sh

Possible problems.

Yes. F.e. the magament monitor port only handles one telnet session at at time.