2024-12-26 14:55:17 +11:00
|
|
|
## Configuration
|
|
|
|
### docker-compose.yml
|
|
|
|
```
|
|
|
|
services:
|
|
|
|
photonglass:
|
|
|
|
container_name: photonglass
|
|
|
|
restart: unless-stopped
|
|
|
|
build: .
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
volumes:
|
|
|
|
- ./instance:/instance
|
|
|
|
# - ./instance/images:/app/static/images # Commented out by default to use default logos
|
|
|
|
```
|
|
|
|
|
2024-12-28 14:12:30 +11:00
|
|
|
### instance/site.yaml
|
2024-12-26 14:55:17 +11:00
|
|
|
```
|
|
|
|
header:
|
|
|
|
title: "photonglass"
|
|
|
|
logo_href: "#"
|
|
|
|
|
|
|
|
footer:
|
|
|
|
text: "photonglass"
|
|
|
|
peeringdb_href: "https://www.peeringdb.com"
|
|
|
|
github_href: "https://github.com/alimickey"
|
2024-12-28 14:12:30 +11:00
|
|
|
```
|
2024-12-26 14:55:17 +11:00
|
|
|
|
2024-12-28 14:12:30 +11:00
|
|
|
### instance/config.yaml
|
|
|
|
```
|
2024-12-26 14:55:17 +11:00
|
|
|
webhook:
|
|
|
|
url: "https://hooks.slack.com/###"
|
|
|
|
```
|
|
|
|
|
|
|
|
### instance/commands.yaml
|
|
|
|
```
|
|
|
|
ping:
|
|
|
|
display_name: "Ping"
|
|
|
|
format: "ping -{ip_version} -c 4 {target}"
|
|
|
|
description: "Test network connectivity"
|
|
|
|
field:
|
|
|
|
type: "text"
|
|
|
|
placeholder: "Enter IP address or hostname"
|
|
|
|
|
|
|
|
traceroute:
|
|
|
|
display_name: "Traceroute"
|
|
|
|
format: "traceroute -{ip_version} {target}"
|
|
|
|
description: "Trace network path to destination"
|
|
|
|
field:
|
|
|
|
type: "text"
|
|
|
|
placeholder: "Enter IP address or hostname"
|
|
|
|
|
|
|
|
mtr:
|
|
|
|
display_name: "MTR"
|
|
|
|
format: "mtr -{ip_version} -r {target}"
|
|
|
|
description: "Trace network path with stats"
|
|
|
|
field:
|
|
|
|
type: "text"
|
|
|
|
placeholder: "Enter IP address or hostname"
|
|
|
|
```
|
|
|
|
|
|
|
|
### instance/devices.yaml
|
|
|
|
```
|
|
|
|
sydney1:
|
|
|
|
display_name: "Sydney"
|
|
|
|
subtext: "Equinix SY3"
|
|
|
|
country_code: "AU"
|
|
|
|
type: "linux"
|
|
|
|
commands:
|
|
|
|
- ping
|
|
|
|
- traceroute
|
|
|
|
- mtr
|
2024-12-28 14:12:30 +11:00
|
|
|
credentials:
|
|
|
|
host: "IP_ADDRESS"
|
|
|
|
port: PORT
|
|
|
|
username: "USERNAME"
|
|
|
|
password: "PASSWORD"
|
|
|
|
ssh_key: "id_rsa" # Optional
|
2024-12-26 14:55:17 +11:00
|
|
|
```
|