Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 62 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,67 @@
# Local secrets
secrets/deploy.secrets.env

# Runtime / reports
*.log
# PowerShell/Windows specific
Thumbs.db
Desktop.ini
$RECYCLE.BIN/
System Volume Information/
*.tmp
*.bak
windows/*.report.json
*.log

# IDE
.idea/
# Environment variables
.env
.env.local
*.env.*

# IDE/Editor files
.vscode/
.idea/
*.swp
*.swo

# Dependencies and build artifacts
node_modules/
__pycache__/
*.pyc
*.class
*.o
*.obj
*.exe
*.dll
*.so
*.a
*.out
dist/
build/
target/
.venv/
venv/
.mypy_cache/
.pytest_cache/
.coverage
coverage/
htmlcov/
.gradle/

# System files
.DS_Store
*.zip
*.gz
*.tar
*.tgz
*.bz2
*.xz
*.7z
*.rar
*.zst
*.lz4
*.lzh
*.cab
*.arj
*.rpm
*.deb
*.Z
*.lz
*.lzo
*.tar.gz
*.tar.bz2
*.tar.xz
*.tar.zst
2 changes: 1 addition & 1 deletion docs/1C_GRAFANA_DEPLOYMENT_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ curl -fsS http://127.0.0.1:9090/-/healthy
Проверка Grafana:

- URL: `http://<host>:3000`
- Дашборд: `1C Бухгалтерия — Overview`
- Дашборд: `1C Бухгалтерия — Обзор`
- Дашборд: `1C Бухгалтерия — SRE`

E2E health-check:
Expand Down
4 changes: 2 additions & 2 deletions grafana-1c/grafana/dashboards/1c-accounting-overview.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"graphTooltip": 0,
"id": null,
"links": [],
"title": "1C Бухгалтерия — Обзор",
"panels": [
{
"datasource": {
Expand Down Expand Up @@ -335,8 +336,7 @@
},
"timepicker": {},
"timezone": "",
"title": "1C Бухгалтерия — Overview",
"uid": "onec-accounting-overview",
"version": 1,
"weekStart": ""
}
}
152 changes: 125 additions & 27 deletions grafana-1c/grafana/dashboards/1c-accounting-sre.json
Original file line number Diff line number Diff line change
@@ -1,88 +1,178 @@
{
"annotations": { "list": [] },
"annotations": {
"list": []
},
"editable": true,
"graphTooltip": 0,
"id": null,
"links": [],
"panels": [
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "red", "value": 7200 }
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 7200
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": { "h": 8, "w": 8, "x": 0, "y": 0 },
"gridPos": {
"h": 8,
"w": 8,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"colorMode": "value",
"graphMode": "none",
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"targets": [{ "expr": "max(onec_data_freshness_seconds)", "refId": "A" }],
"targets": [
{
"expr": "max(onec_data_freshness_seconds)",
"refId": "A"
}
],
"title": "Свежесть данных (сек)",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"mappings": [
{
"options": {
"0": { "text": "DOWN" },
"1": { "text": "UP" }
"0": {
"text": "DOWN"
},
"1": {
"text": "UP"
}
},
"type": "value"
}
]
},
"overrides": []
},
"gridPos": { "h": 8, "w": 8, "x": 8, "y": 0 },
"gridPos": {
"h": 8,
"w": 8,
"x": 8,
"y": 0
},
"id": 2,
"options": {
"colorMode": "value",
"graphMode": "none",
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"targets": [{ "expr": "max(up{job=\"onec_sql_exporter\"})", "refId": "A" }],
"targets": [
{
"expr": "max(up{job=\"onec_sql_exporter\"})",
"refId": "A"
}
],
"title": "SQL Exporter",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": {}, "overrides": [] },
"gridPos": { "h": 8, "w": 8, "x": 16, "y": 0 },
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 8,
"x": 16,
"y": 0
},
"id": 3,
"options": {
"colorMode": "value",
"graphMode": "none",
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"targets": [{ "expr": "sum(ALERTS{alertstate=\"firing\",service=\"onec\"})", "refId": "A" }],
"targets": [
{
"expr": "sum(ALERTS{alertstate=\"firing\",service=\"onec\"})",
"refId": "A"
}
],
"title": "Активные алерты 1С",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": {}, "overrides": [] },
"gridPos": { "h": 10, "w": 24, "x": 0, "y": 8 },
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 8
},
"id": 4,
"options": {
"legend": { "displayMode": "list", "placement": "bottom", "showLegend": true },
"tooltip": { "mode": "single", "sort": "none" }
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
Expand All @@ -98,12 +188,20 @@
"refresh": "30s",
"schemaVersion": 39,
"style": "dark",
"tags": ["1c", "sre"],
"templating": { "list": [] },
"time": { "from": "now-24h", "to": "now" },
"tags": [
"1c",
"sre"
],
"templating": {
"list": []
},
"time": {
"from": "now-24h",
"to": "now"
},
"timezone": "",
"title": "1C Бухгалтерия — SRE",
"uid": "onec-accounting-sre",
"version": 1,
"weekStart": ""
}
}
Loading