Skip to content

heplify-server gets some 2024 love #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
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
19 changes: 18 additions & 1 deletion heplify-server/hom7-influx-grafana/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: '2.1'
services:

db:
# hostname: db
image: postgres:11-alpine
restart: always
environment:
Expand All @@ -24,6 +25,7 @@ services:
max-size: "50m"

heplify-server:
# hostname: heplify
image: sipcapture/heplify-server
container_name: heplify-server
ports:
Expand All @@ -35,6 +37,8 @@ services:
environment:
- "HEPLIFYSERVER_HEPADDR=0.0.0.0:9060"
- "HEPLIFYSERVER_HEPTCPADDR=0.0.0.0:9061"
- "HEPLIFYSERVER_HEPTLSADDR=0.0.0.0:9061"
- "HEPLIFYSERVER_TLSCERTFOLDER=certs"
- "HEPLIFYSERVER_DBDRIVER=postgres"
- "HEPLIFYSERVER_DBSHEMA=homer7"
- "HEPLIFYSERVER_DBADDR=db:5432"
Expand All @@ -43,12 +47,14 @@ services:
- "HEPLIFYSERVER_DBDATATABLE=homer_data"
- "HEPLIFYSERVER_DBROTATE=true"
- "HEPLIFYSERVER_LOGLVL=debug"
# - "HEPLIFYSERVER_LOGDBG=rotator"
- "HEPLIFYSERVER_LOGSTD=true"
- "HEPLIFYSERVER_PROMADDR=0.0.0.0:9096"
# - "HEPLIFYSERVER_PROMTARGETIP="
# - "HEPLIFYSERVER_PROMTARGETNAME="
- "HEPLIFYSERVER_DBDROPDAYS=7"
- "HEPLIFYSERVER_ALEGIDS=X-CID"
# - "HEPLIFYSERVER_SIPHEADER=callid,method,ruri_user,ruri_domain,from_user,from_domain,from_tag,to_user,to_domain,to_tag,contact_user,cseq"
restart: unless-stopped
expose:
- 9090
Expand All @@ -62,6 +68,7 @@ services:
max-size: "50m"

loki:
# hostname: loki
image: grafana/loki
container_name: loki
restart: unless-stopped
Expand All @@ -76,14 +83,18 @@ services:
max-size: "50m"

homer-webapp:
# hostname: homer
container_name: homer-webapp
image: sipcapture/webapp
image: ghcr.io/sipcapture/homer-app
environment:
- "LOKI_HOST=loki"
- "PROM_HOST=prometheus"
# - "GRAFANA_HOST=grafana"
- "DB_HOST=db"
- "DB_USER=root"
- "DB_PASS=homerSeven"
- "DB_KEEPALIVE=false"
- "HOMER_LOGLEVEL=info"
ports:
- "9090:80"
expose:
Expand All @@ -99,6 +110,7 @@ services:
max-size: "50m"

telegraf:
# hostname: telegraf
image: telegraf:1.14-alpine
restart: unless-stopped
volumes:
Expand All @@ -115,6 +127,7 @@ services:
max-size: "50m"

influxdb:
# hostname: influxdb
image: influxdb:1.8-alpine
volumes:
- ./influx:/var/lib/influxdb
Expand All @@ -125,11 +138,14 @@ services:
max-size: "50m"

grafana:
# hostname: grafana
image: grafana/grafana:master
container_name: grafana
volumes:
- ./grafana_data:/var/lib/grafana
- ./grafana_plugins:/var/lib/grafana/plugins
- ./grafana/provisioning/:/etc/grafana/provisioning/
- ./grafana/:/etc/grafana/
environment:
- GF_SECURITY_ALLOW_EMBEDDING=true
- GF_AUTH_ANONYMOUS_ENABLED=true
Expand All @@ -139,6 +155,7 @@ services:
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=false
- GF_EXPLORE_ENABLED=true
# - GF_INSTALL_PLUGINS=some-plugin
restart: unless-stopped
ports:
- "3000:3000"
Expand Down
2 changes: 1 addition & 1 deletion heplify-server/hom7-influx-tick/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ to bring up:
* Telegraf

## Notes
When dealing with prometheus counters in InfluxDB, refer to the following example usage of `difference` and `derivative` functions when selecting:
When dealing with Prometheus counters in InfluxDB, refer to the following example usage of `difference` and `derivative` functions when selecting:
```
SELECT difference(last("counter")) AS "mean_counter" FROM "homer"."autogen"."heplify_method_response" WHERE time > :dashboardTime: GROUP BY time(:interval:), "method", "response" FILL(null)
```
Expand Down
16 changes: 15 additions & 1 deletion heplify-server/hom7-influx-tick/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
max-size: "50m"

db:
# hostname: db
image: postgres:11-alpine
restart: always
environment:
Expand All @@ -44,6 +45,7 @@ services:
max-size: "50m"

heplify-server:
# hostname: heplify
image: sipcapture/heplify-server
container_name: heplify-server
ports:
Expand All @@ -55,6 +57,8 @@ services:
environment:
- "HEPLIFYSERVER_HEPADDR=0.0.0.0:9060"
- "HEPLIFYSERVER_HEPTCPADDR=0.0.0.0:9061"
- "HEPLIFYSERVER_HEPTLSADDR=0.0.0.0:9061"
- "HEPLIFYSERVER_TLSCERTFOLDER=certs"
- "HEPLIFYSERVER_DBDRIVER=postgres"
- "HEPLIFYSERVER_DBSHEMA=homer7"
- "HEPLIFYSERVER_DBADDR=db:5432"
Expand All @@ -63,11 +67,13 @@ services:
- "HEPLIFYSERVER_DBDATATABLE=homer_data"
- "HEPLIFYSERVER_DBROTATE=true"
- "HEPLIFYSERVER_LOGLVL=debug"
# - "HEPLIFYSERVER_LOGDBG=rotator"
- "HEPLIFYSERVER_LOGSTD=true"
- "HEPLIFYSERVER_PROMADDR=0.0.0.0:9096"
- "HEPLIFYSERVER_PROMTARGETIP="
- "HEPLIFYSERVER_PROMTARGETNAME="
- "HEPLIFYSERVER_DBDROPDAYS=7"
# - "HEPLIFYSERVER_SIPHEADER=callid,method,ruri_user,ruri_domain,from_user,from_domain,from_tag,to_user,to_domain,to_tag,contact_user,cseq"
restart: unless-stopped
expose:
- 9090
Expand All @@ -81,14 +87,18 @@ services:
max-size: "50m"

homer-webapp:
# hostname: homer
container_name: homer-webapp
image: sipcapture/webapp
image: ghcr.io/sipcapture/homer-app
environment:
- "LOKI_HOST=loki"
- "PROM_HOST=prometheus"
# - "GRAFANA_HOST=grafana"
- "DB_HOST=db"
- "DB_USER=root"
- "DB_PASS=homerSeven"
- "DB_KEEPALIVE=false"
- "HOMER_LOGLEVEL=info"
ports:
- "9080:80"
expose:
Expand All @@ -104,6 +114,7 @@ services:
condition: service_healthy

telegraf:
# hostname: telegraf
image: telegraf:1.5-alpine
restart: unless-stopped
volumes:
Expand All @@ -118,6 +129,7 @@ services:
- heplify-server

influxdb:
# hostname: influxdb
image: influxdb:1.5-alpine
volumes:
- ./influx:/var/lib/influxdb
Expand All @@ -128,6 +140,7 @@ services:
max-size: "50m"

chronograf:
# hostname: chronograf
image: chronograf:1.5-alpine
environment:
INFLUXDB_URL: http://influxdb:8086
Expand All @@ -144,6 +157,7 @@ services:
max-size: "50m"

kapacitor:
# hostname: kapacitor
image: kapacitor:1.5-alpine
environment:
KAPACITOR_HOSTNAME: kapacitor
Expand Down
4 changes: 2 additions & 2 deletions heplify-server/hom7-prom-all/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ to bring up:
* [Loki] localhost:3100 (admin/admin)
* [Alertmanager] localhost:9093 (admin/admin)

When the Grafana dashboard autoprovisioning does not work for you make sure you have no old grafana volumes.
When the Grafana dashboard auto-provisioning does not work for you make sure you have no old Grafana volumes.

## Configuration

Expand All @@ -40,7 +40,7 @@ curl -s -XPOST localhost:9093/-/reload -u admin:admin
```

#### Service
When you need to change the docker-compose file i.e to setup smtp for Grafana:
When you need to change the docker-compose file i.e to setup SMTP for Grafana:
```bash
docker-compose up -d
```
Expand Down
20 changes: 19 additions & 1 deletion heplify-server/hom7-prom-all/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ volumes:

services:
prometheus:
# hostname: prometheus
image: prom/prometheus:latest
container_name: prometheus
volumes:
Expand All @@ -28,6 +29,7 @@ services:
max-size: "50m"

alertmanager:
# hostname: alert
image: prom/alertmanager:latest
container_name: alertmanager
volumes:
Expand All @@ -47,6 +49,7 @@ services:
- grafana

nodeexporter:
# hostname: nodeexporter
image: prom/node-exporter:latest
container_name: nodeexporter
user: root
Expand All @@ -71,11 +74,14 @@ services:
- prometheus

grafana:
# hostname: grafana
image: grafana/grafana:master
container_name: grafana
volumes:
- grafana_data:/var/lib/grafana
- ./grafana_plugins:/var/lib/grafana/plugins
- ./grafana/provisioning/:/etc/grafana/provisioning/
- ./grafana/:/etc/grafana/
environment:
- GF_SECURITY_ALLOW_EMBEDDING=true
- GF_AUTH_ANONYMOUS_ENABLED=true
Expand All @@ -85,6 +91,7 @@ services:
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=false
- GF_EXPLORE_ENABLED=true
# - GF_INSTALL_PLUGINS=some-plugin
restart: unless-stopped
ports:
- "9030:3000"
Expand All @@ -100,6 +107,7 @@ services:
max-size: "50m"

loki:
# hostname: loki
image: grafana/loki
container_name: loki
restart: unless-stopped
Expand All @@ -114,6 +122,7 @@ services:
max-size: "50m"

heplify-server:
# hostname: heplify
image: sipcapture/heplify-server
container_name: heplify-server
ports:
Expand All @@ -125,6 +134,8 @@ services:
environment:
- "HEPLIFYSERVER_HEPADDR=0.0.0.0:9060"
- "HEPLIFYSERVER_HEPTCPADDR=0.0.0.0:9061"
- "HEPLIFYSERVER_HEPTLSADDR=0.0.0.0:9061"
- "HEPLIFYSERVER_TLSCERTFOLDER=certs"
- "HEPLIFYSERVER_DBSHEMA=homer7"
- "HEPLIFYSERVER_DBDRIVER=postgres"
- "HEPLIFYSERVER_DBADDR=db:5432"
Expand All @@ -135,13 +146,15 @@ services:
- "HEPLIFYSERVER_DBROTATE=true"
- "HEPLIFYSERVER_DBDROPDAYS=5"
- "HEPLIFYSERVER_LOGLVL=info"
# - "HEPLIFYSERVER_LOGDBG=rotator"
- "HEPLIFYSERVER_LOGSTD=true"
- "HEPLIFYSERVER_PROMADDR=0.0.0.0:9096"
# - "HEPLIFYSERVER_PROMTARGETIP=127.0.0.1"
# - "HEPLIFYSERVER_PROMTARGETNAME=local"
- "HEPLIFYSERVER_DEDUP=false"
- "HEPLIFYSERVER_LOKIURL=http://loki:3100/api/prom/push"
- "HEPLIFYSERVER_LOKITIMER=2"
# - "HEPLIFYSERVER_SIPHEADER=callid,method,ruri_user,ruri_domain,from_user,from_domain,from_tag,to_user,to_domain,to_tag,contact_user,cseq"
restart: unless-stopped
depends_on:
- loki
Expand All @@ -156,14 +169,18 @@ services:
max-size: "50m"

homer-webapp:
# hostname: homer
container_name: homer-webapp
image: sipcapture/webapp
image: ghcr.io/sipcapture/homer-app
environment:
- "LOKI_HOST=loki"
- "PROM_HOST=prometheus"
# - "GRAFANA_HOST=grafana"
- "DB_HOST=db"
- "DB_USER=root"
- "DB_PASS=homerSeven"
- "DB_KEEPALIVE=false"
- "HOMER_LOGLEVEL=info"
restart: unless-stopped
ports:
- "9080:80"
Expand All @@ -179,6 +196,7 @@ services:
condition: service_healthy

db:
# hostname: db
container_name: db
image: postgres:11-alpine
environment:
Expand Down
Loading