-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monitor checks #143
Monitor checks #143
Conversation
…into MonitorChecks
…into MonitorChecks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very neat and well laid out 👍
On a more general note, is it not potentially a bit confusing to have both a binary & plaintext version of the config file, where editing the plaintext version will have no effect once the binary version has been generated? Has it been decided that the potential for confusion is worth the flexibility of what can be done with kdb data structures? Would an alternative plaintext format be more suited to the data structure here (which I think includes a dictionary inside a table) e.g. json, which allows for more nested structure than csv (although possibly a bit more limited in terms of datatypes)? |
This is something Jonny and I came up with...another alternative I guess would be to override the CSV? I do think saving down the flat table does maintain the cool flexibility of kdb+ tables. |
hi, can this be reviewed again please? think all the comments have now been addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As always hear from @jonnypress before you merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other bits:
- change times to use .proc.cp[] where appropriate
- add api config
code/processes/monitor.q
Outdated
.monitor.configstored:@[value;`.monitor.configstored;first .proc.getconfigfile["monitorconfig"]]; //name of stored table for save and reload | ||
.monitor.runcheckinterval:@[value;`.monitor.runcheckinterval;0D00:00:05]; //interval to run checks | ||
.monitor.checkinginterval:@[value;`.monitor.checkinginterval;0D00:00:05]; //interval to make sure checks are not lagging | ||
.monitor.cleartrackinterval::@[value;`.monitor.cleartrackinterval;0D00:00:05]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably default to a bit longer - like only really need to do this every hour or so
code/processes/monitor.q
Outdated
.monitor.runcheckinterval:@[value;`.monitor.runcheckinterval;0D00:00:05]; //interval to run checks | ||
.monitor.checkinginterval:@[value;`.monitor.checkinginterval;0D00:00:05]; //interval to make sure checks are not lagging | ||
.monitor.cleartrackinterval::@[value;`.monitor.cleartrackinterval;0D00:00:05]; | ||
.monitor.agecheck:@[value;`.monitor.agecheck;0D00:01:00]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a bit longer by default, e.g 12 hours or something. It's useful to keep a history.
This and the one below also need a comment to explain what they are
config/settings/monitor.q
Outdated
runcheckinterval:0D00:00:05; //interval to run checks | ||
checkinginterval:0D00:00:07; //interval to identify that checks are not lagging | ||
agecheck:0D00:01:00.000000000; //if check over agecheck, delete from tracker | ||
lagtime:0D00:01:00.000000000; //if check has been running over this time, set to neg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update defaults in here, as per comment above
This PR requests to add a new feature to the monitor process.
It adds checkmonitor.q script to its own directory, which is called from monitor.q. It works by making asynchronous calls to target processes and runs them against resultchecker functions. These checks can be user-defined.
The monitor process configuration script has been updated to include this new feature. Documentation has been added under Monitor in Processes.md.