vb.net - Best way to report events / read events (also MySQL) -


so i'm going attempt create basic monitoring tool in vb.net. i'd advice on how tackle logging , reporting side of things i'd appreciate responses users i'm sure have better idea me , can tell me far more efficient ways of doing things.

so plan have client tool, read mysql database values , change every x interval, i'm thinking 10/15 minutes @ moment. side of application quite easy, mean can read database every x amount of time , change labels , display alerts based on them. - documented , okay that.

the second part have client sits in system tray of server gathering required information. system tray part think trickiest bit of this, that's not part of question.

so assume can use normal information gathering commands , store them perhaps strings , can connect same database , add them relevant fields. example if had mysql table called "server" , column titled "connection" check if server has internet connection example , store result value 1 yes , 0 no , send mysql command table update "connection" value either 0/1.

then assume monitoring tool can run mysql query check "connection" column , if value = 0 change label or flag error , if 1 report connectivity okay?

my main questions above listed below.

  1. is using mysql database efficient way of doing this?
  2. obviously if database goes down there's no more reporting, still think that's con i'll have live though.
  3. storing values within code best way store data?
  4. is there particular type of format should use in mysql colum, thinking maybe tinyint(9)?
  5. is above method redundant , pointless?
  6. i assume these database connections cause unwanted server load, 15 minute refresh time should combat that.
  7. is there way combat delays perhaps client updating not in time reporter picks false data, perhaps fail safe column containing last updated time?

you don't need tool gathers information per se. web app (real time monitor) can that, since clients storing information in same database. web app can access database every 15 minutes , display data, without intermediate step of saving again. provide web app latest information instead of potential 29-minute delay.

in other words, clients saving connection information once. don't duplicate in database.

mysql should work anything.

it's bad idea hard code "everything". can use application settings or mysql table if need store ips, etc.

in application this, conversion more offset data savings of tinyint. use convenient data type.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -