Skip to content

Commit

Permalink
extend pkg with kvmprofiler systemd service
Browse files Browse the repository at this point in the history
  • Loading branch information
cha87de committed Dec 29, 2018
1 parent 0aa3993 commit 7062057
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ nfpm:
# additional files, e.g. systemd service
files:
"pkgbuild/kvmtop.service": "/etc/systemd/system/kvmtop.service"
"pkgbuild/kvmprofiler.service": "/etc/systemd/system/kvmprofiler.service"
config_files:
"pkgbuild/kvmtop.conf": "/etc/kvmtop.conf"

Expand Down
13 changes: 13 additions & 0 deletions pkgbuild/kvmprofiler.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Profiler for virtual machine monitoring kvmtop
After=libvirtd.service

[Service]
Type=simple
Restart=always
RestartSec=3
EnvironmentFile=/etc/kvmtop.conf
ExecStart=/usr/bin/kvmprofiler --printer=json --output=tcp --target=${KVMTOP_TARGET} --cpu --net --mem --io --disk --host --verbose ${KVMPROFILER_PARAMS}

[Install]
WantedBy=multi-user.target
3 changes: 2 additions & 1 deletion pkgbuild/kvmtop.conf
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
KVMTOP_TARGET=192.168.50.230:12345
KVMTOP_TARGET=192.168.50.230:12345
KVMPROFILER_PARAMS="--states 4 --history 1 --filterstddevs 256 --outputFreq 60s --buffersize 10"

0 comments on commit 7062057

Please sign in to comment.