2024-04-08 13:50:37 +00:00
|
|
|
import MonitorInfrastructure from './Jobs/MonitorInfrastructure';
|
2024-04-08 13:03:07 +00:00
|
|
|
import { argv } from 'yargs';
|
|
|
|
|
|
|
|
const secretKey: string | undefined = (argv as any)['secret-key'];
|
2024-04-08 13:50:37 +00:00
|
|
|
const oneuptimeUrl: string =
|
2024-04-08 13:03:07 +00:00
|
|
|
(argv as any)['oneuptime-url'] || 'https://oneuptime.com';
|
|
|
|
|
|
|
|
if (!secretKey) {
|
|
|
|
throw new Error(
|
|
|
|
'No secret-key argument found. You can find secret key for this monitor on OneUptime Dashboard'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2024-04-08 13:50:37 +00:00
|
|
|
MonitorInfrastructure.initJob(secretKey, oneuptimeUrl);
|