Skip to content

Instantly share code, notes, and snippets.

@vozerov
vozerov / gist:c3578e727e511cd99fd7e9af3e348e14
Created February 15, 2019 11:05
Calculate working interval between 2 timestamps in elasticsearch
// constants
// holidays or vacations, date format must be the same
Set HOLIDAYS = new HashSet(['02.02.2019', '03.02.2019']);
// date format need by date check
def SIMPLE_DATE_FORMAT = new SimpleDateFormat('dd.MM.YYYY');
// time/date constants
long DAY = 24 * 60 * 60 * 1000, HOUR = 60 * 60 * 1000;
package main
import (
"fmt"
"github.com/alouca/gosnmp"
)
const (
cmdCommunity string = "public"
cmdTarget string = "192.168.0.50"