-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New - Ajout de monitoring sur les endpoints
- Loading branch information
1 parent
cc231f8
commit 9eacab4
Showing
12 changed files
with
255 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM alpine | ||
|
||
ENV VERSION=v3.0 | ||
|
||
ADD https://github.com/CastawayLabs/cachet-monitor/releases/download/${VERSION}/cachet_monitor_linux_amd64 /usr/bin/cachet-monitor | ||
|
||
RUN apk add --no-cache --virtual ca-certificates \ | ||
&& apk add --no-cache --virtual tzdata \ | ||
&& chmod 755 /usr/bin/cachet-monitor | ||
|
||
COPY docker-entrypoint.sh / | ||
|
||
ENTRYPOINT [ "/docker-entrypoint.sh" ] | ||
|
||
CMD [ "cachet-monitor","-c", "/etc/cachet-monitor.yaml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
api: | ||
url: https://status.sheaft.com/api/v1 | ||
token: ###### | ||
insecure: false | ||
date_format: 02/01/2006 15:04:05 MST | ||
monitors: | ||
- name: graphql | ||
target: https://api.sheaft.com/health/livez | ||
strict: true | ||
method: GET | ||
component_id: 3 | ||
metric_id: 1 | ||
template: | ||
investigating: | ||
subject: "{{ .Monitor.Name }} - {{ .SystemName }}" | ||
message: "{{ .Monitor.Name }} check **failed** (server time: {{ .now }})\n\n{{ .FailReason }}" | ||
fixed: | ||
subject: "GraphQL Fixed" | ||
interval: 60 | ||
timeout: 10 | ||
threshold: 80 | ||
expected_status_code: 200 | ||
expected_body: "OK" | ||
- name: jobs | ||
target: https://jobs.sheaft.com/health/livez | ||
strict: true | ||
method: GET | ||
component_id: 4 | ||
metric_id: 2 | ||
template: | ||
investigating: | ||
subject: "{{ .Monitor.Name }} - {{ .SystemName }}" | ||
message: "{{ .Monitor.Name }} check **failed** (server time: {{ .now }})\n\n{{ .FailReason }}" | ||
fixed: | ||
subject: "Jobs Fixed" | ||
interval: 60 | ||
timeout: 10 | ||
threshold: 80 | ||
expected_status_code: 200 | ||
expected_body: "OK" | ||
- name: payment | ||
target: https://payment.sheaft.com/health/livez | ||
strict: true | ||
method: GET | ||
component_id: 5 | ||
metric_id: 3 | ||
template: | ||
investigating: | ||
subject: "{{ .Monitor.Name }} - {{ .SystemName }}" | ||
message: "{{ .Monitor.Name }} check **failed** (server time: {{ .now }})\n\n{{ .FailReason }}" | ||
fixed: | ||
subject: "Payment Fixed" | ||
interval: 60 | ||
timeout: 10 | ||
threshold: 80 | ||
expected_status_code: 200 | ||
expected_body: "OK" | ||
- name: signalr | ||
target: https://signalr.sheaft.com/health/livez | ||
strict: true | ||
method: GET | ||
component_id: 6 | ||
metric_id: 4 | ||
template: | ||
investigating: | ||
subject: "{{ .Monitor.Name }} - {{ .SystemName }}" | ||
message: "{{ .Monitor.Name }} check **failed** (server time: {{ .now }})\n\n{{ .FailReason }}" | ||
fixed: | ||
subject: "Signalr Fixed" | ||
interval: 60 | ||
timeout: 10 | ||
threshold: 80 | ||
expected_status_code: 200 | ||
expected_body: "OK" | ||
- name: identity | ||
target: https://auth.sheaft.com/health/livez | ||
strict: true | ||
method: GET | ||
component_id: 13 | ||
metric_id: 5 | ||
template: | ||
investigating: | ||
subject: "{{ .Monitor.Name }} - {{ .SystemName }}" | ||
message: "{{ .Monitor.Name }} check **failed** (server time: {{ .now }})\n\n{{ .FailReason }}" | ||
fixed: | ||
subject: "Identity Fixed" | ||
interval: 60 | ||
timeout: 10 | ||
threshold: 80 | ||
expected_status_code: 200 | ||
expected_body: "OK" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
|
||
if [ -n "$CONFIG" ]; then | ||
echo "Found configuration variable, will write it to /etc/cachet-monitor.yaml" | ||
echo "$CONFIG" > /etc/cachet-monitor.yaml | ||
elif [ ! -f /etc/cachet-monitor.yaml ]; then | ||
echo "Please provide configuration in CONFIG variable or write it in /etc/cachet-monitor.yaml" | ||
exit 1 | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
version: '3' | ||
services: | ||
sql: | ||
image: mysql:5.7 | ||
restart: always | ||
environment: | ||
- MYSQL_ROOT_PASSWORD=######### | ||
- MYSQL_USER=user_sa | ||
- MYSQL_PASSWORD=######### | ||
- MYSQL_DATABASE=cachethq | ||
volumes: | ||
- sheaftstatus:/var/lib/mysql | ||
cachet: | ||
image: sheaft/sheaft.cachethq:latest | ||
ports: | ||
- 8000:8080 | ||
environment: | ||
- DB_DRIVER=mysql | ||
- DB_HOST=sql | ||
- DB_DATABASE=cachethq | ||
- DB_USERNAME=user_sa | ||
- DB_PASSWORD==######### | ||
- DB_PREFIX=chq_ | ||
- APP_KEY=base64:D9XPB/5oa1fi7RfcWdkZGtqx90JHdJXCfS/J7g0ZnZ4= | ||
- APP_LOG=errorlog | ||
- APP_ENV=production | ||
- APP_DEBUG=true | ||
- APP_URL=https://status.sheaft.com | ||
- QUEUE_DRIVER=sync | ||
- MAIL_DRIVER=SMTP | ||
- MAIL_HOST==######### | ||
- MAIL_PORT=25 | ||
- MAIL_USERNAME=######### | ||
- MAIL_PASSWORD==######### | ||
- [email protected] | ||
- MAIL_NAME="Monitoring Sheaft" | ||
- MAIL_ENCRYPTION=tls | ||
restart: always | ||
monitoring: | ||
image: sheaft/sheaft.cachetmonitor:latest | ||
restart: always | ||
volumes: | ||
- ${WEBAPP_STORAGE_HOME}/site/wwwroot/config.yml:/etc/cachet-monitor.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace Sheaft.Web.Api.Controllers | ||
{ | ||
public class HealthController : Controller | ||
{ | ||
public IActionResult Livez() | ||
{ | ||
return Ok("OK"); | ||
} | ||
|
||
public IActionResult Readyz() | ||
{ | ||
return Ok("OK"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace Sheaft.Web.Jobs.Controllers | ||
{ | ||
public class HealthController : Controller | ||
{ | ||
public IActionResult Livez() | ||
{ | ||
return Ok("OK"); | ||
} | ||
|
||
public IActionResult Readyz() | ||
{ | ||
return Ok("OK"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace Sheaft.Web.Manage.Controllers | ||
{ | ||
public class HealthController : Controller | ||
{ | ||
public IActionResult Livez() | ||
{ | ||
return Ok("OK"); | ||
} | ||
|
||
public IActionResult Readyz() | ||
{ | ||
return Ok("OK"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace Sheaft.Web.Payment.Controllers | ||
{ | ||
public class HealthController : Controller | ||
{ | ||
public IActionResult Livez() | ||
{ | ||
return Ok("OK"); | ||
} | ||
|
||
public IActionResult Readyz() | ||
{ | ||
return Ok("OK"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace Sheaft.Web.Signalr.Controllers | ||
{ | ||
public class HealthController : Controller | ||
{ | ||
public IActionResult Livez() | ||
{ | ||
return Ok("OK"); | ||
} | ||
|
||
public IActionResult Readyz() | ||
{ | ||
return Ok("OK"); | ||
} | ||
} | ||
} |