<commit_before>var http = require('http');
var pkill = require('pkill');
var schedule = require('node-schedule');
var winston = require('winston');

var options = {
    host: '127.0.0.1',
    path: '/',
    port: '1880',
    method: 'GET'
};

var logger = new (winston.Logger)({
    transports: [
        //new (winston.transports.Console)({timestamp: true}),
        new (winston.transports.DailyRotateFile)({
            name: 'file',
            datePattern: '.yyyy-MM-dd',
            timestamp: true,
            filename: '/var/log/node-red-monitoring/node-red-responding.log' })
    ]
});

logger.log("info", "Node-red responding process started.");

var j = schedule.scheduleJob('*/10 * * * *', function(){

    logger.log("info", "Checking now.");

    var req = http.request(options, function(res) {
    });

    req.on('socket', function (socket) {
        socket.setTimeout(10000);
        socket.on('timeout', function() {
            req.abort();
        });
    });

    req.on('error', function(err) {
        if (err.code === "ECONNRESET") {<commit_msg>Added responding monitoring process<commit_after>var http = require('http');
var pkill = require('pkill');
var schedule = require('node-schedule');
var winston = require('winston');

var options = {
    host: '127.0.0.1',
    path: '/',
    port: '1880',
    method: 'GET'
};

var logger = new (winston.Logger)({
    transports: [
        //new (winston.transports.Console)({timestamp: true}),
        new (winston.transports.DailyRotateFile)({
            name: 'file',
            datePattern: '.yyyy-MM-dd',
            timestamp: true,
            filename: '/var/log/node-red-monitoring/node-red-responding.log' })
    ]
});

logger.log("info", "Node-red responding process started.");

var j = schedule.scheduleJob('*/10 * * * *', function(){

    //logger.log("info", "Checking now.");

    var req = http.request(options, function(res) {
    });

    req.on('socket', function (socket) {
        socket.setTimeout(10000);
        socket.on('timeout', function() {
            req.abort();
        });
    });

    req.on('error', function(err) {
        if (err.code === "ECONNRESET") {
{'fraction_non_alphanumeric': 0.1866913123844732, 'fraction_numerical': 0.015711645101663587, 'mean_word_length': 2.620401337792642, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1167194', 'n_tokens_mistral': 715, 'n_tokens_neox': 678, 'n_words': 137}