Simple Uptime Robot Dashing widget
Dashing widget to display a short list of Uptime Robot monitors.
##Usage
Add this to your Gemfile and run bundle install
:
<?php | |
add_filter('gform_validation_1', 'ip_validation'); | |
function ip_validation($validation_result){ | |
$form = $validation_result["form"]; | |
//validate input 9 on form 1 for valid IP | |
if($_POST['input_9'] != filter_var($_POST['input_9'], FILTER_VALIDATE_IP)){ | |
$validation_result["is_valid"] = false; | |
foreach($form["fields"] as &$field){ | |
if($field["id"] == "9"){ | |
$field["failed_validation"] = true; |
{ | |
"title": "Apache Overview", | |
"services": { | |
"query": { | |
"list": { | |
"2": { | |
"id": 2, | |
"type": "topN", | |
"query": "", | |
"alias": "", |
filter { | |
if [message] =~ /^#/ { | |
drop { } | |
} | |
else { | |
if [type] == "BRO_httplog" { | |
grok { | |
match => [ "message", "(?<ts>(.*?))\t(?<uid>(.*?))\t(?<id.orig_h>(.*?))\t(?<id.orig_p>(.*?))\t(?<id.resp_h>(.*?))\t(?<id.resp_p>(.*?))\t(?<trans_depth>(.*?))\t(?<method>(.*?))\t(?<host>(.*?))\t(?<uri>(.*?))\t(?<referrer>(.*?))\t(?<user_agent>(.*?))\t(?<request_body_len>(.*?))\t(?<response_body_len>(.*?))\t(?<status_code>(.*?))\t(?<status_msg>(.*?))\t(?<info_code>(.*?))\t(?<info_msg>(.*?))\t(?<filename>(.*?))\t(?<tags>(.*?))\t(?<username>(.*?))\t(?<password>(.*?))\t(?<proxied>(.*?))\t(?<orig_fuids>(.*?))\t(?<orig_mime_types>(.*?))\t(?<resp_fuids>(.*?))\t(?<resp_mime_types>(.*))" ] | |
} |
{ | |
"title": "Traffic Eth1 BRO IDS", | |
"services": { | |
"query": { | |
"idQueue": [], | |
"list": { | |
"0": { | |
"query": "files.log", | |
"alias": "", | |
"color": "#7EB26D", |
APACHE_ERROR_TIME %{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{YEAR} | |
APACHE_ERROR_LOG \[%{APACHE_ERROR_TIME:timestamp}\] \[%{LOGLEVEL:loglevel}\] (?:\[client %{IPORHOST:clientip}\] ){0,1}%{GREEDYDATA:errormsg} |
filter { | |
if [type] == "syslog" { | |
grok { | |
match => { "message" => "%{MONTH:month} %{MONTHDAY:day} %{TIME:time} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}"} | |
add_field => [ "received_at", "%{@timestamp}" ] | |
add_field => [ "event_time", "%{time}"] | |
add_field => [ "received_from", "%{host}" ] | |
add_field => ["logdate","%{month} %{day} %{time}"] | |
remove_field => ["month","day", "time"] | |
remove_field => ["syslog_pid"] |
[elasticsearch-1.1] | |
name=Elasticsearch repository for 1.1.x packages | |
baseurl=http://packages.elasticsearch.org/elasticsearch/1.1/centos | |
gpgcheck=1 | |
gpgkey=http://packages.elasticsearch.org/GPG-KEY-elasticsearch | |
enabled=1 |
### Place in your /etc/cron.d/ directory | |
### Assumes your git folder is at /root/backup | |
SHELL=/bin/bash | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin | |
HOME=/root/ | |
* 2 * * * root cd /root/backup && iptables-save > /root/backup/iptables && git add . && git commit -m "Daily Backup" && git push >> /root/backup/log 2>&1 |
Simple Uptime Robot Dashing widget
Dashing widget to display a short list of Uptime Robot monitors.
##Usage
Add this to your Gemfile and run bundle install
:
This widget is based on the standard Dashing Meter widget and the Hotness Widget created by Rowanu.
Use it as the standard Meter widget and add the following attributes in your dashboard elements declaration :