Compare commits

..

10 Commits

Author SHA1 Message Date
Joe Tretter
5d64bc16a8 add sql to get the application errors. 2019-05-16 14:06:50 -05:00
Joe
890cf2c3e6 Got rid of the "Copyright" --- it's not copyright, it's copyleft :) 2019-05-14 13:36:13 -05:00
Joe Tretter
d06d0a32bf Implement a non-polling flag in the DB-Extractor 2019-04-09 14:20:21 -05:00
Joe
84c045f6c8 misc smaller changes and change example config to include time based SQL condition to prevent loss of in-flight data. 2019-02-25 06:42:15 -06:00
Joe
61ef23cc91 xx 2019-01-31 12:11:00 -06:00
Joe
abcf426b09 xx 2019-01-31 12:09:35 -06:00
Joe
02d5edd623 xx 2019-01-31 12:08:32 -06:00
Joe
851d7bca1a xx 2019-01-31 12:07:38 -06:00
Joe
0bf3b6c013 xxx 2019-01-31 12:06:17 -06:00
Joe
12a77dbea6 delete temp file 2019-01-31 12:03:02 -06:00
9 changed files with 37 additions and 29 deletions

5
.gitignore vendored
View File

@@ -78,6 +78,7 @@ typings/
# DynamoDB Local files # DynamoDB Local files
.dynamodb/ .dynamodb/
casRpsLogExtractor/casRpsLogExtractor.config.json
casRpsLogExtractor/casRpsLogExtractor.maxPKey.dat DBExtractor/DBExtractor.config.json
DBExtractor/DBExtractor.maxPKey.dat
diskUsageMonitor/diskUsageMonitor.config.json diskUsageMonitor/diskUsageMonitor.config.json

View File

@@ -1,18 +0,0 @@
{
"dbDriver":"mssql", "dbDriverComment":"either mssql (user/password) or mssql/msnodesqlv8 (trustedConnection)",
"processingType": "casrpslog",
"sourceTag": "CCERpsLog",
"maxResultsPerMessage":100,
"statements":{
"poller":"'select top ' + config.maxResultsPerMessage + ' * from rpslog where pkey > \\'' + maxPKey + '\\' order by pkey'"
},
"serverURI": "http://localhost:2222",
"pollIntervalIdle": 10000,
"sqlConfig": {
"user": "casdbuser",
"password": "4KcLao2016!",
"server": "ustww2063\\CCE",
"database": "CAS110",
"port": 1433
}
}

View File

@@ -5,9 +5,10 @@
"serverURI": "http://localhost:2222", "serverURI": "http://localhost:2222",
"maxResultsPerMessage":100, "maxResultsPerMessage":100,
"statements":{ "statements":{
"poller":"'select top ' + config.maxResultsPerMessage + ' * from rpslog where pkey > \\'' + maxPKey + '\\' order by pkey'" "poller":"'select top ' + config.maxResultsPerMessage + ' * from rpslog with (nolock) where pkey > \\'' + maxPKey + '\\' order by pkey'"
}, },
"pollIntervalIdle": 10000, "pollIntervalIdle": 10000,
"pollMode": false,
"UP_sqlConfig": { "UP_sqlConfig": {
"user": "casdbuser", "user": "casdbuser",
"password": "4KcLao2016!", "password": "4KcLao2016!",

View File

@@ -15,12 +15,12 @@ const logger = winston.createLogger({
), ),
transports: [ transports: [
new winston.transports.Console(), new winston.transports.Console(),
new winston.transports.File({ filename: './log/DBExtractorError.log', level: 'error' }), new winston.transports.File({ filename: '../log/DBExtractorError.log', level: 'error' }),
new winston.transports.File({ filename: './log/Combined.log' }) new winston.transports.File({ filename: '../log/Combined.log' })
] ]
}); });
console.log(`DBExtractor Copyright (C) 2019 j.tretter@gmail.com console.log(`DBExtractor - by j.tretter@gmail.com
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -99,8 +99,13 @@ try {
}); });
process.stdout.write(">" + allRows.length + ">"); process.stdout.write(">" + allRows.length + ">");
} else { } else {
if (config.pollMode) {
theInterval = setInterval(runNextPoll, config.pollIntervalIdle); theInterval = setInterval(runNextPoll, config.pollIntervalIdle);
process.stdout.write("."); process.stdout.write(".");
} else {
sql.close();
return(true);
}
} }
allRows=[]; allRows=[];

View File

@@ -1 +0,0 @@
0010000000a7l7bx

View File

@@ -20,7 +20,7 @@ const logger = winston.createLogger({
const processingType = "diskusage"; const processingType = "diskusage";
console.log(`diskUsageMonitor Copyright (C) 2019 j.tretter@gmail.com console.log(`diskUsageMonitor - by j.tretter@gmail.com
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@@ -0,0 +1,20 @@
select '{"Logic":"-", "Field":"LogText", "Comp":"~", "Value":"/^' +
replace(replace(replace(replace(replace(replace(replace(TXT ,'%1','.*'),'%2','.*'),'%3','.*'),'%4','.*'),'%5','.*'),'%6','.*'),'%7','.*')
+ '/"},' from (
select replace(replace(replace(replace(replace(replace(TXT,'"','\"'),'(','\\('),')','\\)'),'.','\\.'),'*','\\*'),'+','\\+') "TXT" from (
select CASE WHEN CHARINDEX(char(10),TXT)=0 THEN txt
ELSE SUBSTRING(TXT,0,CHARINDEX(char(10),TXT)-1)
END "TXT" from (
select distinct convert(nvarchar(max),text) TXT
from RpsMessageText
where status != 'd'
and language != 'de'
and rpsmessagepkey not in (select pkey from rpsmessage where CodePrefix in( 'ANA','ASP','BWI','GRI','PDA','STR','RPS','TPO','SVC','PLN') or id like '%Char' )
) a
where txt not like 'Validation notification%'
and txt not like 'Validiation notification%'
and txt not like 'Notificação de validação%'
and txt not like '¡Alerta de Validación!%'
) b
) c
Where len(convert(varchar(max),TXT)) > 10 /* anything shorter than 10 will be some sort of label or so.*/

Binary file not shown.

View File

@@ -22,7 +22,7 @@ const logger = winston.createLogger({
const ruleEngine = new RuleEngine("*"); const ruleEngine = new RuleEngine("*");
console.log(`logAggregator Service Copyright (C) 2019 j.tretter@gmail.com console.log(`logAggregator Service - by j.tretter@gmail.com
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by