зеркало из https://github.com/mozilla/fxa.git
reorganized heka files
This commit is contained in:
Родитель
3c06ad49f5
Коммит
eb8ca14083
|
@ -5,7 +5,7 @@
|
|||
],
|
||||
"env": {
|
||||
"CONFIG_FILES": "$HOME/code/config/aws.json,$HOME/config.json",
|
||||
"HEKAD_CONFIG": "$HOME/code/config/hekad.toml"
|
||||
"HEKAD_CONFIG": "$HOME/code/heka/hekad.toml"
|
||||
},
|
||||
"remote_hooks": {
|
||||
"postcreate": "scripts/aws/post_create.sh",
|
||||
|
|
|
@ -31,7 +31,7 @@ type = "SandboxFilter"
|
|||
message_matcher = "Type == 'ops'"
|
||||
ticker_interval = 60
|
||||
script_type = "lua"
|
||||
filename = "./sandbox/heka.lua"
|
||||
filename = "/home/app/code/heka/memory.lua"
|
||||
preserve_data = true
|
||||
memory_limit = 1048576
|
||||
instruction_limit = 100
|
|
@ -0,0 +1,22 @@
|
|||
data = circular_buffer.new(1440, 3, 60)
|
||||
local RSS = data:set_header(1, "RSS", "max")
|
||||
local TOTAL = data:set_header(2, "HEAP_TOTAL", "max")
|
||||
local USED = data:set_header(3, "HEAP_USED", "max")
|
||||
|
||||
function process_message()
|
||||
local ts = read_message("Timestamp")
|
||||
local rss = read_message("Fields[rss]")
|
||||
local heapTotal = read_message("Fields[heapTotal]")
|
||||
local heapUsed = read_message("Fields[heapUsed]")
|
||||
if rss == nil then return 0 end
|
||||
|
||||
data:add(ts, RSS, rss)
|
||||
data:add(ts, TOTAL, heapTotal)
|
||||
data:add(ts, USED, heapUsed)
|
||||
return 0
|
||||
end
|
||||
|
||||
function timer_event(ns)
|
||||
output(data)
|
||||
inject_message("cbuf", "Process Memory Usage")
|
||||
end
|
|
@ -0,0 +1,6 @@
|
|||
ip_address = "127.0.0.1:5565"
|
||||
[signer]
|
||||
name = "test"
|
||||
hmac_hash = "md5"
|
||||
hmac_key = "4865ey9urgkidls xtb0[7lf9rzcivthkm"
|
||||
version = 0
|
|
@ -1,5 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "Restarting heka"
|
||||
kill -s INT `ps -aefw | grep "hekad" | grep -v " grep " | awk '{print $2}'`
|
||||
nohup hekad -config=$HEKAD_CONFIG &
|
||||
|
||||
pid=`ps -aefw | grep "hekad" | grep -v " grep " | awk '{print $2}'`
|
||||
if [[ $pid ]] ; then
|
||||
kill -s INT $pid
|
||||
fi
|
||||
nohup hekad -config=$HEKAD_CONFIG > /dev/null 2>&1 &
|
||||
|
||||
echo "DONE"
|
Загрузка…
Ссылка в новой задаче