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