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

adding kprobe service file for running with systemd #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions kprobe.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# General Kentik variables
[email protected]
KENTIK_API_TOKEN=XXX_FILL_ME_IN
KENTIK_REGION=US

# The name of the interface that kprobe will monitor, e.g. eth0.
# kprobe monitors only one interface per running instance.
KPROBE_DEVICE_INTERFACE=

# The device's IPv4 address configured as "Sending IP" in Kentik Portal
KPROBE_DEVICE_IP=


17 changes: 17 additions & 0 deletions kprobe.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[Unit]
Description=Kentik kprobe flow agent that captures traffic on the host and sends it to Kentik over an SSL tunnel
After=network.target

[Service]
EnvironmentFile=-/etc/default/kprobe.env
Environment=KENTIK_EMAIL=${KENTIK_API_EMAIL}
Environment=KENTIK_TOKEN=${KENTIK_API_TOKEN}
Type=simple
User=root
WorkingDirectory=/root
ExecStart=/usr/bin/kprobe --region ${KENTIK_REGION} -i ${KPROBE_DEVICE_INTERFACE} --device-ip ${KPROBE_DEVICE_IP}
Restart=on-failure
RestartSec=3

[Install]
WantedBy=multi-user.target
6 changes: 6 additions & 0 deletions package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ files:
"/usr/bin/kprobe":
file: kprobe
mode: "0755"
"/etc/default/kprobe.env.sample":
file: kprobe.env.sample
mode: "0644"
keep: true
units:
- kprobe.service
Loading