mirror of
https://github.com/limosek/zaf-plugins.git
synced 2024-11-01 08:17:19 +01:00
Repaired psx discovery
This commit is contained in:
parent
32d96e6707
commit
0be5a6b9f2
@ -8,7 +8,7 @@ Version: 0.1
|
|||||||
Url: https://raw.githubusercontent.com/limosek/zaf-plugins/master/psx
|
Url: https://raw.githubusercontent.com/limosek/zaf-plugins/master/psx
|
||||||
Web: https://github.com/limosek/zaf-plugins/
|
Web: https://github.com/limosek/zaf-plugins/
|
||||||
Maintainer: Lukas Macura <lukas@macura.cz>
|
Maintainer: Lukas Macura <lukas@macura.cz>
|
||||||
Install-bin: cpu-get.sh proc-discovery.sh
|
Install-bin: proc-discovery.sh
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
Depends-dpkg: dash curl
|
Depends-dpkg: dash curl
|
||||||
@ -16,15 +16,6 @@ Depens-opkg: busybox curl
|
|||||||
Depends-rpm: curl
|
Depends-rpm: curl
|
||||||
Depends-bin: curl ps
|
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:
|
Item discovery:
|
||||||
Description::
|
Description::
|
||||||
Discovery of runing processes
|
Discovery of runing processes
|
||||||
|
@ -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
|
|
||||||
|
|
@ -64,7 +64,7 @@ Returns the {#PSNAME} and {#PSUSER} discovery macros which return the process na
|
|||||||
<snmp_community/>
|
<snmp_community/>
|
||||||
<multiplier>0</multiplier>
|
<multiplier>0</multiplier>
|
||||||
<snmp_oid/>
|
<snmp_oid/>
|
||||||
<key>proc.cpu[{#PSNAME},{#PSUSER}]</key>
|
<key>proc.cpu.util[{#PSNAME},{#PSUSER}]</key>
|
||||||
<delay>60</delay>
|
<delay>60</delay>
|
||||||
<history>14</history>
|
<history>14</history>
|
||||||
<trends>365</trends>
|
<trends>365</trends>
|
||||||
|
Loading…
Reference in New Issue
Block a user