This commit is contained in:
@@ -205,35 +205,35 @@ from generate_series(1, 525600) s(i)
|
||||
if (DateUtil.IsAfterDuration(_lastSnapshot, tsOneHour))
|
||||
{
|
||||
//RECORDS IN TABLE
|
||||
//Only do this once per hour
|
||||
log.LogTrace("Counting table records");
|
||||
// //Only do this once per hour
|
||||
// log.LogTrace("Counting table records");
|
||||
|
||||
|
||||
//Get a count of important tables in db
|
||||
List<string> allTableNames = await DbUtil.GetAllTablenamesAsync();
|
||||
// //Get a count of important tables in db
|
||||
// List<string> allTableNames = await DbUtil.GetAllTablenamesAsync();
|
||||
|
||||
//Skip some tables as they are internal and / or only ever have one record
|
||||
List<string> skipTableNames = new List<string>();
|
||||
skipTableNames.Add("alicense");
|
||||
skipTableNames.Add("aschemaversion");
|
||||
// //Skip some tables as they are internal and / or only ever have one record
|
||||
// List<string> skipTableNames = new List<string>();
|
||||
// skipTableNames.Add("alicense");
|
||||
// skipTableNames.Add("aschemaversion");
|
||||
|
||||
foreach (string table in allTableNames)
|
||||
{
|
||||
if (!skipTableNames.Contains(table))
|
||||
{
|
||||
//var tags = new MetricTags("TableTagKey", table);
|
||||
// metrics.Measure.Gauge.SetValue(MetricsRegistry.DBRecordsGauge, tags, await DbUtil.CountOfRecordsAsync(table));
|
||||
}
|
||||
}
|
||||
// foreach (string table in allTableNames)
|
||||
// {
|
||||
// if (!skipTableNames.Contains(table))
|
||||
// {
|
||||
// //var tags = new MetricTags("TableTagKey", table);
|
||||
// // metrics.Measure.Gauge.SetValue(MetricsRegistry.DBRecordsGauge, tags, await DbUtil.CountOfRecordsAsync(table));
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
//JOB COUNTS (DEAD, RUNNING, COMPLETED, SLEEPING)
|
||||
|
||||
foreach (JobStatus stat in Enum.GetValues(typeof(JobStatus)))
|
||||
{
|
||||
// var jobtag = new MetricTags("JobStatus", stat.ToString());
|
||||
// metrics.Measure.Gauge.SetValue(MetricsRegistry.JobsGauge, jobtag, await JobsBiz.GetCountForJobStatusAsync(ct, stat));
|
||||
}
|
||||
// foreach (JobStatus stat in Enum.GetValues(typeof(JobStatus)))
|
||||
// {
|
||||
// // var jobtag = new MetricTags("JobStatus", stat.ToString());
|
||||
// // metrics.Measure.Gauge.SetValue(MetricsRegistry.JobsGauge, jobtag, await JobsBiz.GetCountForJobStatusAsync(ct, stat));
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -248,9 +248,9 @@ from generate_series(1, 525600) s(i)
|
||||
if (DateUtil.IsAfterDuration(_lastSnapshot, ts24Hours))
|
||||
{
|
||||
//FILES ON DISK
|
||||
log.LogTrace("Files on disk information");
|
||||
var UtilFilesInfo = FileUtil.GetUtilityFolderSizeInfo();
|
||||
var UserFilesInfo = FileUtil.GetAttachmentFolderSizeInfo();
|
||||
// log.LogTrace("Files on disk information");
|
||||
// var UtilFilesInfo = FileUtil.GetUtilityFolderSizeInfo();
|
||||
// var UserFilesInfo = FileUtil.GetAttachmentFolderSizeInfo();
|
||||
|
||||
// var mtag = new MetricTags("File type", "Business object files");
|
||||
// metrics.Measure.Gauge.SetValue(MetricsRegistry.FileCountGauge, mtag, UserFilesInfo.FileCountWithChildren);
|
||||
@@ -261,7 +261,6 @@ from generate_series(1, 525600) s(i)
|
||||
// metrics.Measure.Gauge.SetValue(MetricsRegistry.FileSizeGauge, mtag, UtilFilesInfo.SizeWithChildren);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user