项目作者: geekerlw

项目描述 :
agent for open-falcon based on falcon-plus agent model
高级语言: Go
项目地址: git://github.com/geekerlw/falcon-agent.git
创建时间: 2018-04-03T05:37:14Z
项目社区:https://github.com/geekerlw/falcon-agent

开源协议:Apache License 2.0

下载


falcon-agent

This is an agent port of open-falcon, just like the origin agent module, but can running on both windows and linux.

Features

  • besic data collection(cpu, mem, disk and etc.)
  • process cpu, mem, nums collection
  • snmp device custom collection
  • http api to push
  • single execute file, can working with windows service or linux systemd
  • plugin execute support, but not support git or http sync

Installation

it is a golang classic project

  1. # set GOPATH and GOROOT
  2. go get github.com/geekerlw/falcon-agent
  3. cd $GOPATH/src/github.com/geekerlw/falcon-agent
  4. go build -o falcon-agent.exe # for windows
  5. go build -o falcon-agent # for linux

Support metrics

common

Counters Type Tag Notes
agent.alive GAUGE / agent is alive

cpu

Counters Type Tag Notes
cpu.user GAUGE / cpu user time
cpu.system GAUGE / cpu system time
cpu.idle GAUGE / cpu idle time
cpu.nice GAUGE / cpu nice time
cpu.iowait GAUGE / cpu iowait time
cpu.irq GAUGE / cpu irq time
cpu.softirq GAUGE / cpu softirq time
cpu.steal GAUGE / cpu steal time
cpu.guestnice GAUGE / cpu gusesnice time
cpu.stolen GAUGE / cpu stolen time
cpu.used.percent GAUGE / cpu used percent

memory

Counters Type Tag Notes
mem.swap.total GAUGE / total swap memory
mem.swap.used GAUGE / used swap memory
mem.swap.free GAUGE / free swap memory
mem.swap.used.percent GAUGE / swap memory used percent
mem.total GAUGE / total virtual memory
mem.available GAUGE / total available virtual memory
mem.used GAUGE / used memory
mem.free GAUGE / free memory
mem.used.percent GAUGE / memory used percent

Disk

Counters Type Tag Notes
disk.total GAUGE diskpath=%s total
disk.free GAUGE diskpath=%s free
disk.used GAUGE diskpath=%s used
disk.used.percent GAUGE diskpath=%s used percent

Network

Counters Type Tag Notes
net.if.bytes.send COUNTER / sum of all information
net.if.bytes.recv COUNTER / sum of all information
net.if.packets.send COUNTER / sum of all information
net.if.packets.recv COUNTER / sum of all information
net.if.err.in COUNTER / sum of all information
net.if.err.out COUNTER / sum of all information
net.if.drop.in COUNTER / sum of all information
net.if.drop.out COUNTER / sum of all information
net.if.fifo.in COUNTER / sum of all information
net.if.fifo.out COUNTER / sum of all information

Process

Counters Type Tag Notes
proc.num GAUGE name=name,cmdline=cmdline process number
proc.cpu.percent GAUGE name=name,cmdline=cmdline process cpu use
proc.mem.percent GAUGE name=name,cmdline=cmdline process memory use

Snmp

Counters Type Tag Notes
snmp.get GAUGE addr=address,oid=oid get oid value from address

Configuration

  • heartbeat: heartbeat server rpc address
  • transfer: transfer rpc address
  • collector: metric configs
  • ignore: the metrics should be ignored

Refer to cfg.example.json, modify the file name to cfg.json :

  1. {
  2. "debug": true,
  3. "hostname": "",
  4. "ip": "",
  5. "plugin": {
  6. "enabled": false,
  7. "dir": "./plugin",
  8. "git": "https://github.com/open-falcon/plugin.git",
  9. "logs": "./logs"
  10. },
  11. "heartbeat": {
  12. "enabled": true,
  13. "addr": "127.0.0.1:6030",
  14. "interval": 60,
  15. "timeout": 1000
  16. },
  17. "transfer": {
  18. "enabled": true,
  19. "addrs": [
  20. "127.0.0.1:8433",
  21. "127.0.0.1:8433"
  22. ],
  23. "interval": 60,
  24. "timeout": 1000
  25. },
  26. "http": {
  27. "enabled": true,
  28. "listen": ":1988",
  29. "backdoor": false
  30. },
  31. "collector": {
  32. "ifacePrefix": [], // deprecated
  33. "mountPoint": [], // deprecated
  34. },
  35. "default_tags": {
  36. },
  37. "ignore": {
  38. }
  39. }

License

This software is licensed under the Apache License. See the LICENSE file in the top distribution directory for the full license text.