Skip to content

Commit

Permalink
Merge pull request #5 from johntdyer/fix-files
Browse files Browse the repository at this point in the history
Fix contrib files to remove slack
  • Loading branch information
johntdyer authored Nov 22, 2019
2 parents 68ae2ee + 3cd1bcc commit 719041f
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 139 deletions.
2 changes: 1 addition & 1 deletion contrib/example-critical.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"high_flap_threshold": 0,
"command": "http_check.sh http://localhost:80",
"handlers": [
"slack"
"webex-team"
],
"interval": 20,
"low_flap_theshold": 0,
Expand Down
246 changes: 143 additions & 103 deletions contrib/example-ok.json
Original file line number Diff line number Diff line change
@@ -1,110 +1,150 @@
{
"type": "Event",
"api_version": "core/v2",
"metadata": {
"namespace": "default"
},
"spec": {
"check": {
"check_hooks": null,
"command": "check-cpu.sh -w 75 -c 90",
"duration": 1.07055808,
"env_vars": null,
"executed": 1552594757,
"handlers": [],
"high_flap_threshold": 0,
"history": [{
"executed": 1552594757,
"status": 0
}],
"interval": 60,
"issued": 1552594757,
"last_ok": 1552594758,
"low_flap_threshold": 0,
"metadata": {
"name": "check-cpu",
"namespace": "default"
"timestamp": 1522170515,

"entity": {
"entity_class": "agent",
"system": {
"hostname": "webserver01",
"os": "linux",
"platform": "centos",
"platform_family": "rhel",
"platform_version": "7.4.1708",
"network": {
"interfaces": [{
"name": "lo",
"addresses": [
"127.0.0.1/8",
"::1/128"
]
},
{
"name": "enp0s3",
"mac": "08:00:27:11:ad:d2",
"addresses": [
"10.0.2.15/24",
"fe80::26a5:54ec:cf0d:9704/64"
]
},
{
"name": "enp0s8",
"mac": "08:00:27:bc:be:60",
"addresses": [
"172.28.128.3/24",
"fe80::a00:27ff:febc:be60/64"
]
}
]
},
"occurrences": 1,
"occurrences_watermark": 1,
"output": "CPU OK - Usage:3.96\n",
"output_metric_format": "",
"output_metric_handlers": [],
"proxy_entity_name": "",
"publish": true,
"round_robin": false,
"runtime_assets": [],
"state": "passing",
"status": 0,
"stdin": false,
"subdue": null,
"subscriptions": [
"linux"
],
"timeout": 0,
"total_state_change": 0,
"ttl": 0
"arch": "amd64"
},
"entity": {
"deregister": false,
"deregistration": {},
"entity_class": "agent",
"last_seen": 1552594641,
"metadata": {
"name": "sensu-centos",
"namespace": "default"
"subscriptions": [
"testing",
"entity:webserver01"
],
"last_seen": 1542667635,
"deregister": false,
"deregistration": {},
"user": "agent",
"redact": [
"password",
"passwd",
"pass",
"api_key",
"api_token",
"access_key",
"secret_key",
"private_key",
"secret"
],
"metadata": {
"name": "webserver01",
"namespace": "default",
"labels": null,
"annotations": null
}
},
"check": {
"command": "http_check.sh http://localhost:80",
"handlers": [
"webex-teams"
],
"high_flap_threshold": 0,
"interval": 20,
"low_flap_threshold": 0,
"publish": true,
"runtime_assets": [],
"subscriptions": [
"testing"
],
"proxy_entity_name": "",
"check_hooks": null,
"stdin": false,
"ttl": 0,
"timeout": 0,
"duration": 0.010849143,
"executed": 1542667666,
"history": [{
"status": 1,
"executed": 1542667666
},
"redact": [
"password",
"passwd",
"pass",
"api_key",
"api_token",
"access_key",
"secret_key",
"private_key",
"secret"
],
"subscriptions": [
"linux",
"entity:sensu-centos"
],
"system": {
"arch": "amd64",
"hostname": "sensu-centos",
"network": {
"interfaces": [{
"addresses": [
"127.0.0.1/8",
"::1/128"
],
"name": "lo"
},
{
"addresses": [
"10.0.2.15/24",
"fe80::9688:67ca:3d78:ced9/64"
],
"mac": "08:00:27:11:ad:d2",
"name": "enp0s3"
},
{
"addresses": [
"172.28.128.3/24",
"fe80::a00:27ff:fe6b:c1e9/64"
],
"mac": "08:00:27:6b:c1:e9",
"name": "enp0s8"
}
]
},
"os": "linux",
"platform": "centos",
"platform_family": "rhel",
"platform_version": "7.4.1708"
{
"status": 0,
"executed": 1522100915
},
"user": "agent"
},
"timestamp": 1552594758
{
"status": 0,
"executed": 1522300915
},
{
"status": 0,
"executed": 1522100915
},
{
"status": 0,
"executed": 1522300915
},
{
"status": 0,
"executed": 1522200915
},
{
"status": 0,
"executed": 1522300915
},
{
"status": 0,
"executed": 1522400915
},
{
"status": 1,
"executed": 1522500915
},
{
"status": 0,
"executed": 1522600915
},
{
"status": 0,
"executed": 1522700915
}

],
"issued": 1542667666,
"output": "ok",
"state": "ok",
"status": 0,
"total_state_change": 0,
"last_ok": 0,
"occurrences": 0,
"occurrences_watermark": 1,
"output_metric_format": "",
"output_metric_handlers": [],
"env_vars": null,
"metadata": {
"name": "check-nginx",
"namespace": "default",
"labels": null,
"annotations": null
}
}
}
34 changes: 11 additions & 23 deletions contrib/example-other.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,9 @@
}
},
"check": {
"check_hooks": null,
"duration": 1.903135228,
"executed": 1522100915,
"high_flap_threshold": 0,
"history": [{
"executed": 1522100315
},
{
"executed": 1522100915
}
],
"command": "http_check.sh http://localhost:80",
"handlers": [
"slack"
"webex-teams"
],
"high_flap_threshold": 0,
"interval": 20,
Expand All @@ -101,45 +90,44 @@
{
"status": 0,
"executed": 1522100915
}, {
},
{
"status": 0,
"executed": 1522300915
},

{
"status": 0,
"executed": 1522100915
}, {
},
{
"status": 0,
"executed": 1522300915
},


{
"status": 0,
"executed": 1522200915
}, {
},
{
"status": 0,
"executed": 1522300915
},


{
"status": 0,
"executed": 1522400915
}, {
},
{
"status": 1,
"executed": 1522500915
},

{
"status": 0,
"executed": 1522600915
}, {
},
{
"status": 0,
"executed": 1522700915
}

],
"issued": 1542667666,
"output": "example output",
Expand Down
13 changes: 1 addition & 12 deletions contrib/example-warning.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,9 @@
}
},
"check": {
"check_hooks": null,
"duration": 1.903135228,
"executed": 1522100915,
"high_flap_threshold": 0,
"history": [{
"executed": 1522100315
},
{
"executed": 1522100915
}
],
"command": "http_check.sh http://localhost:80",
"handlers": [
"slack"
"webex-teams"
],
"high_flap_threshold": 0,
"interval": 20,
Expand Down

0 comments on commit 719041f

Please sign in to comment.