WebUI error, fail to connect due to missing or invalid config.json
See original GitHub issueIssue Summary i am trying to build web ui follow this docs: http://docs.alerta.io/en/latest/gettingstarted/tutorial-1-deploy-alerta.html#step-2-configuration but maybe it go wrong missing “endpoint”
Environment
-
OS: Ubuntu 18.04 (proxmox VM)
-
API version: lastest (pip3 install)
-
Python 3.6.8
-
Deployment: self-hosted
-
For self-hosted, WSGI environment: nginx/uwsgi
-
Database: Postgres 11
-
Server config:
uwsgi.ini
cat /etc/uwsgi.ini
[uwsgi]
http = 127.0.0.1:8080
chdir = /var/www
mount = /api=wsgi.py
callable = app
manage-script-name = true
env = BASE_URL=/api
master = true
processes = 5
logger = syslog:alertad
socket = /tmp/uwsgi.sock
chmod-socket = 664
uid = www-data
gid = www-data
vacuum = true
die-on-term = true
config.json
cat /var/www/html/config.json
{"endpoint": "http://172.26.8.137:8080"}
alertad config
cat /etc/alertad.conf
DEBUG = True
SECRET_KEY = 'xxx'
BASE_URL = '/api'
USE_PROXYFIX = False
AUTH_REQUIRED = False
ALARM_MODEL='ALERTA'
DEFAULT_FIELD = 'text'
DEFAULT_PAGE_SIZE = 1000
HISTORY_LIMIT = 100
HISTORY_ON_VALUE_CHANGE = False
DATABASE_URL = 'postgresql://xxx:xxx@localhost:5432/test'
ALERT_TIMEOUT = 43200
HEARTBEAT_TIMEOUT = 7200
SEVERITY_MAP = {
'critical': 1,
'warning': 4,
'indeterminate': 5,
'ok': 5,
'unknown': 9
}
DEFAULT_NORMAL_SEVERITY = 'ok'
DEFAULT_PREVIOUS_SEVERITY = 'indeterminate'
COLOR_MAP = {
'severity': {
'critical': 'red',
'warning': '#1E90FF',
'indeterminate': 'lightblue',
'ok': '#00CC00',
'unknown': 'silver'
},
'text': 'black',
'highlight': 'skyblue '
}
SITE_LOGO_URL = 'http://pigment.github.io/fake-logos/logos/vector/color/fast-banana.svg'
DATE_FORMAT_SHORT_TIME = 'HH:mm'
DATE_FORMAT_MEDIUM_DATE = 'EEE d MMM HH:mm'
DATE_FORMAT_LONG_DATE = 'd/M/yyyy h:mm:ss.sss a'
DEFAULT_AUDIO_FILE = '/audio/Bike Horn.mp3'
COLUMNS = ['severity', 'status', 'lastReceiveTime', 'duplicateCount',
'customer', 'environment', 'service', 'resource', 'event', 'value', 'text']
SORT_LIST_BY = 'lastReceiveTime'
ACTIONS = ['createIssue', 'updateIssue']
AUTO_REFRESH_INTERVAL = 30000
PLUGINS = ['reject']
PLUGINS_RAISE_ON_ERROR = False
ORIGIN_BLACKLIST = ['foo/bar$', '.*/qux']
ALLOWED_ENVIRONMENTS=['Production']
Expected behavior
curl localhost:80
...
<strong>We're sorry but Vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><script>(function(){
var redirect = sessionStorage.redirect;
delete sessionStorage.redirect;
if (redirect && redirect != location.href) {
history.replaceState(null, null, redirect);
}
}
Screenshots
Additional context
curl http://localhost:8080
...
{
"href": "http://localhost:8080/api/webhooks/slack",
"method": "POST,GET",
"rel": "webhooks.slack"
},
{
"href": "http://localhost:8080/api/webhooks/stackdriver",
"method": "POST,GET",
"rel": "webhooks.stackdriver"
},
{
"href": "http://localhost:8080/api/webhooks/telegram",
"method": "POST,GET",
"rel": "webhooks.telegram"
}
],
"status": "ok",
"uri": "http://localhost:8080/api/"
Set up alerta with uwsgi is ok
alerta version
alerta 7.4.1
alerta client 7.4.0
requests 2.22.0
click 7.0
i have try change {“endpoint”: “/api”} but it still not work, am i missing something in the config, or i am going on a wrong way ?, please help me. thanks you.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Missing or invalid config ownCloud Web - Server
After installing ownCloud Web, when I click on application switcher called New Design , I should not get the error 'Missing or invalid...
Read more >Alerta Documentation - Read the Docs
The alerta monitoring system is a tool used to consolidate and de-duplicate alerts from multiple sources for quick 'at- a-glance' visualisation.
Read more >alerta/alerta-beta - Docker Image - Docker Hub
Version 7.0 of the Alerta web UI is a VueJS web app. webui ... or place a config.json configuration file in the dist...
Read more >Troubleshoot Mobile VPN with SSL - WatchGuard Technologies
If client traffic through the Mobile VPN with SSL connection is denied as unhandled, the problem is almost always related to group membership....
Read more >Troubleshoot Firepower Threat Defense Policy Deployments
This error typically occurs when a device has moved or is taken from a second domain. A re-deploy while no cross-domain information occurs ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OMG, i have tried before, and it fail, but now it ok, thank you, thank you very much.
Check for errors in the javascript console of your browser and any 400 or 500 errors in the network tab.