zenvdeluca / net_healer Goto Github PK
View Code? Open in Web Editor NEWNET HEALER receive DDoS Attack reports from FastNetMon collectors allowing custom triggers on a per stage based actions.
NET HEALER receive DDoS Attack reports from FastNetMon collectors allowing custom triggers on a per stage based actions.
Would it be possible for you to put up an example of how you are handling the bgp blackhole /32 advertisement in ruby? I see that you gitignore a actions-available/bgp.rb file. Would be helpful to see how this works since it looks like you're not using FNM for the /32 route advertisement.
It's a good practice to set what exact versions or (minimum) versions for each of one the gems you're using.
I am getting this error and am not sure exactly why. It appears that I have everything setup (somewhat) but i'm not able to track this one down.
2016-04-29 15:07:59 - NameError - uninitialized constant Healer::Actions:
/opt/nethealer/routes/ddos.rb:90:in `block (2 levels) in <class:Healer>'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:in `call'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:in `block in compile!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in `block (3 levels) in route!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:993:in `route_eval'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in `block (2 levels) in route!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1014:in `block in process_route'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:in `catch'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:in `process_route'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:972:in `block in route!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:971:in `each'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:971:in `route!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1084:in `block in dispatch!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `block in invoke'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `catch'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `invoke'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1081:in `dispatch!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:in `block in call!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `block in invoke'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `catch'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in `invoke'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:in `call!'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:894:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
/var/lib/gems/2.3.0/gems/rack-1.6.0/lib/rack/nulllogger.rb:9:in `call'
/var/lib/gems/2.3.0/gems/rack-1.6.0/lib/rack/head.rb:13:in `call'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:181:in `call'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:2021:in `call'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in `block in call'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1795:in `synchronize'
/var/lib/gems/2.3.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in `call'
/var/lib/gems/2.3.0/gems/puma-2.11.1/lib/puma/configuration.rb:82:in `call'
/var/lib/gems/2.3.0/gems/puma-2.11.1/lib/puma/server.rb:507:in `handle_request'
/var/lib/gems/2.3.0/gems/puma-2.11.1/lib/puma/server.rb:375:in `process_client'
/var/lib/gems/2.3.0/gems/puma-2.11.1/lib/puma/server.rb:262:in `block in run'
/var/lib/gems/2.3.0/gems/puma-2.11.1/lib/puma/thread_pool.rb:104:in `block in spawn_thread'
# cat .env
SSL_KEY_PATH="/opt/nethealer/ssl/nethealer.key"
SSL_CERT_PATH="/opt/nethealer/ssl/nethealer.crt"
NETHEALER_SERVER="${ipaddress}"
NETHEALER_INFLUXDB="${ipaddress}"
NETHEALER_USERNAME="fastnetmon"
NETHEALER_PASSWORD="fastnetmon"
GRAFANA_URL="http://${grafana_host}:3000"
THRESHOLD_EXPIRE="450"
THRESHOLD_WARNING="2"
THREDHOLD_CRITICAL="3"
NOTIFICATION_EMAIL_SMTP="localhost"
NOTIFICATION_EMAIL_FROM="root"
NOTIFICATION_EMAIL_TO="root"
NOTIFICATION_LOCATION="NULL"
#OPTIONAL PLUGINS
#PAGERDUTY_KEY=""
#FLOWDOCK_TOKENS="allow,multiple,flows,separated,by,comma"
Hello,
I try to get Net Healer up and running
I configured all parts
redis_enabled = on redis_port = 6379 redis_host = 127.0.0.1
graphite = on graphite_host = 127.0.0.1 graphite_port = 2003
[[graphite]] enabled = true database = "graphite" bind-address = ":2003" protocol = "tcp" consistency-level = "one" name-separator = "."
batch-size = 5000 # will flush if this many points get buffered batch-timeout = "10s" # will flush at least this often even if we haven't hit buffer limit
templates = [ "fastnetmon.hosts.* app.measurement.cidr.direction.function.resource", "fastnetmon.networks.* app.measurement.cidr.direction.resource", "fastnetmon.total.* app.measurement.direction.resource" ]
bind 127.0.0.1
default settings, nothing changed
1445734800 7 false false} {1459040400 6 false false} {1477789200 7 false false} {1490490000 6 false false} {1509238800 7 false false} {1521939600 6 false false} {1540688400 7 false false} {1553994000 6 false false} {1572138000 7 false false} {1585443600 6 false false} {1603587600 7 false false} {1616893200 6 false false} {1635642000 7 false false} {1648342800 6 false false} {1667091600 7 false false} {1679792400 6 false false} {1698541200 7 false false} {1711846800 6 false false} {1729990800 7 false false} {1743296400 6 false false} {1761440400 7 false false} {1774746000 6 false false} {1792890000 7 false false} {1806195600 6 false false} {1824944400 7 false false} {1837645200 6 false false} {1856394000 7 false false} {1869094800 6 false false} {1887843600 7 false false} {1901149200 6 false false} {1919293200 7 false false} {1932598800 6 false false} {1950742800 7 false false} {1964048400 6 false false} {1982797200 7 false false} {1995498000 6 false false} {2014246800 7 false false} {2026947600 6 false false} {2045696400 7 false false} {2058397200 6 false false} {2077146000 7 false false} {2090451600 6 false false} {2108595600 7 false false} {2121901200 6 false false} {2140045200 7 false false}] 1459040400 1477789200 0xc82007c7c0})}} map[ret:day]}' database not found: metrics
bundle exec script/start Puma starting in single mode... Version 2.11.1 (ruby 2.2.4-p230), codename: Intrepid Squirrel Min threads: 1, max threads: 1 Environment: development Daemonizing...
SSL_KEY_PATH="./new.key" SSL_CERT_PATH="./cert.pem"
NETHEALER_SERVER="nethealer1.mydomain.come" NETHEALER_INFLUXDB="nethealer1.mydomain.com" NETHEALER_USERNAME="root" NETHEALER_PASSWORD="root"
GRAFANA_URL="http://nethealer1.mydomain.com:3000"
Sinatradoesn’t know this ditty. Try this: in healer.rb class Healer get '/' do "Hello World" end end
{"status":"clear","timestamp":"20160405-084023"}
Regards,
Chris
Hello,
I'm trying to execute net healer and I found several errors during execution.
My configurations:
redis_enabled = on
# Reddis configuration
redis_port = 6379
redis_host = myIP
graphite = on
graphite_host = myIP
graphite_port = 2003
graphite_prefix = fastnetmon
/etc/redis/6379.conf
) I have: bind myIP
.[[graphite]]
enabled = true
database = "graphite"
bind-address = ":2003"
protocol = "tcp"
consistency-level = "one"
name-separator = "."
batch-size = 5000 # will flush if this many points get buffered
batch-timeout = "1s" # will flush at least this often even if we haven't hit buffer limit
templates = [
"fastnetmon.hosts.* app.measurement.cidr.direction.function.resource",
"fastnetmon.networks.* app.measurement.cidr.direction.resource",
"fastnetmon.total.* app.measurement.direction.resource"
]
engine:
influxdb:
host: myIP
port: 8086
user: root
password: root
database: graphite
anomaly_measurement: anomaly
measurement_tag: m
So, when I execute bundle exec scripts/start
, I see follow errors:
24243620 Rufus::Scheduler::EveryJob "5s" {}
24243620 error:
24243620 24243620
24243620 NoMethodError
24243620 undefined method `[]' for nil:NilClass
24243620 script/pooler.rb:22:in `block in <main>'
24243620 /var/lib/gems/2.1.0/gems/rufus-scheduler-3.1.3/lib/rufus/scheduler/jobs.rb:234:in `call'
24243620 /var/lib/gems/2.1.0/gems/rufus-scheduler-3.1.3/lib/rufus/scheduler/jobs.rb:234:in `do_call'
24243620 /var/lib/gems/2.1.0/gems/rufus-scheduler-3.1.3/lib/rufus/scheduler/jobs.rb:258:in `do_trigger'
24243620 /var/lib/gems/2.1.0/gems/rufus-scheduler-3.1.3/lib/rufus/scheduler/jobs.rb:300:in `block (3 levels) in start_work_thread'
24243620 /var/lib/gems/2.1.0/gems/rufus-scheduler-3.1.3/lib/rufus/scheduler/jobs.rb:303:in `call'
24243620 /var/lib/gems/2.1.0/gems/rufus-scheduler-3.1.3/lib/rufus/scheduler/jobs.rb:303:in `block (2 levels) in start_work_thread'
24243620 /var/lib/gems/2.1.0/gems/rufus-scheduler-3.1.3/lib/rufus/scheduler/jobs.rb:289:in `loop'
24243620 /var/lib/gems/2.1.0/gems/rufus-scheduler-3.1.3/lib/rufus/scheduler/jobs.rb:289:in `block in start_work_thread'
and the templates (hosts, network and total) doesn't create in InfluxDB.
Thanks.
Regards.
I think Jira and Flowdock shouldn't be first class citizens.
I would try and move them to maybe a plugin directory and use some sort of conditional loading.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.