diff --git a/psx/control.zaf b/psx/control.zaf index 9a010a2..18b7fe3 100644 --- a/psx/control.zaf +++ b/psx/control.zaf @@ -8,7 +8,7 @@ Version: 0.1 Url: https://raw.githubusercontent.com/limosek/zaf-plugins/master/psx Web: https://github.com/limosek/zaf-plugins/ Maintainer: Lukas Macura -Install-bin: cpu-get.sh proc-discovery.sh +Install-bin: proc-discovery.sh # Dependencies Depends-dpkg: dash curl @@ -16,15 +16,6 @@ Depens-opkg: busybox curl Depends-rpm: curl Depends-bin: curl ps -Item cpu: -Parameters: process_name -Description:: - This item will return cpu usage of given process. - In zabbix, it will be prefixed automaticaly by plugin name (psx.cpu) -:: -Cmd: {PLUGINDIR}/cpu-get.sh $1 -/Item - Item discovery: Description:: Discovery of runing processes diff --git a/psx/cpu-get.sh b/psx/cpu-get.sh deleted file mode 100755 index 33cf9fe..0000000 --- a/psx/cpu-get.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -TOTAL=0 -for PROC in $(/bin/ps u -C $1 | /bin/grep -e '^$2' | /usr/bin/awk '{ print $$3 }'); do TOTAL=$(echo "$TOTAL $PROC" | /usr/bin/awk '{print $$1 + $$2}') ; done; -echo $TOTAL - diff --git a/psx/template.xml b/psx/template.xml index 1b5d515..340f5e6 100644 --- a/psx/template.xml +++ b/psx/template.xml @@ -64,7 +64,7 @@ Returns the {#PSNAME} and {#PSUSER} discovery macros which return the process na 0 - proc.cpu[{#PSNAME},{#PSUSER}] + proc.cpu.util[{#PSNAME},{#PSUSER}] 60 14 365