Skip to content

Notification when a Thing is down monitering #65

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

Closed
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
13 changes: 11 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ COAP_NEGOTIATION_PORT_OUT=5684
SMART_HOME_SMART_CLOCK_PORT_OUT=5685
TRAEFIK_DASHBOARD_PORT_OUT=8080

STACK_HOSTNAME="plugfest.thingweb.io"
BROKER_URI="plugfest.thingweb.io"
# STACK_HOSTNAME="plugfest.thingweb.io"
# BROKER_URI="plugfest.thingweb.io"
STACK_HOSTNAME=localhost
BROKER_URI=localhost
PORT=8087

LOKI_HOSTNAME="http://loki"
Expand All @@ -26,3 +28,10 @@ HC_INTERVAL=40s
HC_TIMEOUT=30s
HC_RETRIES=3
HC_START_PERIOD=60s

# Email Configuration
SMTP_HOST=type-here
SMTP_PORT=type-here
SMTP_USER=type-here
SMTP_PASS=type-here
NOTIFICATION_EMAIL=type-here
1 change: 1 addition & 0 deletions docker-compose-things.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ services:
memory: 25M
networks:
- things_network

networks:
things_network:
name: things_network
Expand Down
21 changes: 21 additions & 0 deletions monitoring/thing-monitor/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:18-alpine

WORKDIR /app

# Copy package files
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy source code
COPY . .

# Build TypeScript code
RUN npm run build

# Expose the API port
EXPOSE 3000

# Set the default command to run the test script
CMD ["npm", "run", "test:monitor"]
Loading