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

34
test-telegram.js Normal file
View File

@@ -0,0 +1,34 @@
const https = require('https');
const BOT_TOKEN = '8116790669:AAE_llOFDFSwDhPx40vZMBa6dGv3Xxa9ZiQ';
const CHAT_ID = '8599028500';
const message = '🧪 Test from LogViewer Monitor\n\nIf you see this, notifications work! ✅';
const payload = JSON.stringify({
chat_id: CHAT_ID,
text: message,
parse_mode: 'Markdown',
});
console.log('Sending to Telegram...');
console.log(' Bot:', BOT_TOKEN.substring(0, 10) + '...');
console.log(' Chat:', CHAT_ID);
const req = https.request({
hostname: 'api.telegram.org',
path: `/bot${BOT_TOKEN}/sendMessage`,
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();