Skip to content

Instantly share code, notes, and snippets.

View justinkambic's full-sized avatar
🏠
Working from home

Justin Kambic justinkambic

🏠
Working from home
View GitHub Profile
### Keybase proof
I hereby claim:
* I am justinkambic on github.
* I am jkambic (https://keybase.io/jkambic) on keybase.
* I have a public key ASBz_METi429tHTeks7B2EmX3YxO3MMrwxW3OP13TgJOygo
To claim this, I am signing this object:
@justinkambic
justinkambic / uptime_kub_container_test_doc.json
Created May 9, 2019 17:14
A JSON document used for testing one of my PRs
{
"@timestamp": "2019-05-09T16:48:45.004Z",
"requests": 1,
"monitor": {
"type": "icmp",
"check_group": "4c1eeadc-727a-11e9-955d-8c85908eb3b0",
"ip": "8.8.8.8",
"status": "up",
"duration": {
"us": 14637
@justinkambic
justinkambic / schema.gql.ts
Created June 11, 2019 13:33
A WIP GQL schema for heartbeat-states index
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import gql from 'graphql-tag';
export const monitorStatesSchema = gql`
type Agent {
GET heartbeat-7*/_search
{
"query": {
"bool": {
"filter": [
{
"exists": {
"field": "summary.up"
}
}
This file has been truncated, but you can view the full file.
- type: http
schedule: "@every 1m"
urls: ["http://localhost:20000/"]
- type: http
schedule: "@every 1m"
urls: ["http://localhost:20001/"]
- type: http
schedule: "@every 1m"
urls: ["http://localhost:20002/"]
- type: http
@justinkambic
justinkambic / gist:3871200d5c1c5c8f74002ed4a327d8d1
Last active March 11, 2020 14:29
es query with spread vs without
// with spread
{
"size": 0,
"query": {
"bool": {
"filter": [
{
"exists": {
"field": "summary"
}
env GEO_NAME="fairbanks" env DATA_PATH="~/tmp/heartbeat-data2" env ES_URL="http://localhost:9200" env AUTH="/Users/jk/git/justinkambic/kibana/packages/kbn-dev-utils/certs/ca.crt" env CERT="/Users/jk/git/justinkambic/kibana/packages/kbn-dev-utils/certs/elasticsearch.crt" env KEY="/Users/jk/git/justinkambic/kibana/packages/kbn-dev-utils/certs/elasticsearch.key" ./heartbeat -e
2020-04-13T09:03:28.389-0400 INFO instance/beat.go:609 Home path: [/Users/jk/git/justinkambic/src/github.com/elastic/beats/heartbeat] Config path: [/Users/jk/git/justinkambic/src/github.com/elastic/beats/heartbeat] Data path: [~/tmp/heartbeat-data2] Logs path: [/Users/jk/git/justinkambic/src/github.com/elastic/beats/heartbeat/logs]
2020-04-13T09:03:28.390-0400 INFO instance/beat.go:617 Beat ID: e71b4c44-395e-4944-80e8-6d5826284d96
2020-04-13T09:03:28.392-0400 INFO [beat] instance/beat.go:945 Beat info {"system_info": {"beat": {"path": {"config": "/Users/jk/git/justinkambic/src/github.com/elastic/beats/heartbeat", "data": "~/tmp/heartbeat-
heartbeat.monitors:
###### from shahzad
- type: http
name: elastic
hosts: ["https://www.elastic.co"]
schedule: "@every 10s"
tags: ["secure"]
mode: all
fields_under_root: true
{
"took" : 0,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
@justinkambic
justinkambic / gist:484cfc7d7c1faf230e8d141665a3ac2b
Created February 9, 2021 18:43
desired synthetics policy
// currently
- id: 90976344-cd1f-4f1c-8d96-efa2f8324738
name: synthetics-1
revision: 1
type: synthetics/http
use_output: default
meta:
package:
name: synthetics
version: 0.1.3