Initial commit: LogMaster with Viewer Collector Monitor modes
Some checks failed
LogMaster CI/CD / build-and-test (push) Has been cancelled
LogMaster CI/CD / docker (push) Has been cancelled

This commit is contained in:
2026-05-04 13:50:15 +02:00
commit 44cd9ab001
231 changed files with 29018 additions and 0 deletions

27
test-monitor-telegram.js Normal file
View File

@@ -0,0 +1,27 @@
const http = require('http');
// Test the notification endpoint on the monitor
const payload = JSON.stringify({
type: 'telegram',
botToken: '8116790669:AAE_llOFDFSwDhPx40vZMBa6dGv3Xxa9ZiQ',
chatId: '8599028500',
});
console.log('Testing Telegram notification via Monitor API...');
const req = http.request({
hostname: 'localhost', port: 8082,
path: '/api/monitor/test-notification',
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(payload) },
}, (res) => {
let body = '';
res.on('data', c => body += c);
res.on('end', () => {
console.log(' Status:', res.statusCode);
console.log(' Response:', body);
});
});
req.on('error', (e) => console.error(' Error:', e.message));
req.write(payload);
req.end();