diff --git a/server/src/index.ts b/server/src/index.ts index 3b3dcaf..16b93a1 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -7,7 +7,7 @@ import { router as alertsRouter } from './routes/alerts'; import { tgBotInit } from './services/notification'; const app = express(); -const PORT = 8000; +const PORT = process.env.HASTIC_PORT || 8000; app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); diff --git a/src/data_provider.py b/src/data_provider.py index d2764a8..d087284 100644 --- a/src/data_provider.py +++ b/src/data_provider.py @@ -136,7 +136,7 @@ class DataProvider: def __query_grafana(self, params): - headers = { 'Authorization': 'Bearer ' + os.environ['API_KEY'] } + headers = { 'Authorization': 'Bearer ' + os.environ['HASTIC_API_KEY'] } url = self.datasource['origin'] + '/' + self.datasource['url'] + '?' + urlencode(params) req = urllib.request.Request(url, headers=headers)