ML to predict server health based on text logs.

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

Nabi

New Member
Jun 9, 2018
3
0
1
Hello,
Can any one please help to create ML in python to predict if server has issue based on this log:

2018-06-07 18:25:48 Server Health message received for localhost
2018-06-07 18:30:50 Server Health message received for localhost
2018-06-07 18:35:47 Server Health message received for localhost
2018-06-07 18:40:39 Server Health message received for localhost
2018-06-07 18:48:43 Server Health message received for localhost
2018-06-07 18:53:43 Server Health message received for localhost
2018-06-07 18:58:39 Server Health message received for localhost
2018-06-07 19:03:35 Server Health message received for localhost
2018-06-07 19:09:11 Server Health message received for localhost
2018-06-07 19:16:30 Server Health message received for localhost
2018-06-07 19:21:56 Server Health message received for localhost


======================

Every health message suppose to appear in the log every 5 min. In case it appears in LESS or MORE than 5 min then it means the server has issue.

Thanks
 

manxam

Active Member
Jul 25, 2015
234
50
28
I'm not certain this is machine learning..
Can you not just wait for a line of text, start a timer, and then call a function if the next line of text arrives <> 5 minutes?
 

Nabi

New Member
Jun 9, 2018
3
0
1
Yeah, but i am trying to see if i can use ML for that. So the ML will learn from this log what is good and what is bad, and based on that can predict if there is an issue...
 

Taco

New Member
May 30, 2015
17
1
3
You already know what you want to do.
All that is left is to first write it out in words and then code it.
When the script is finished you will need to make sure that it runs on start up and that it has a way to notify the server/application administrator.
 

BLinux

cat lover server enthusiast
Jul 7, 2016
2,669
1,081
113
artofserver.com
you need to figure out how you want to massage that data into something you can feed into an algorithm. there are many ways to accomplish this... and like suggested above, the easiest is simply to create a threshold check... there's nothing the system is "learning" here other than you telling it what the rules are.

probably the way i might approach this is to calculate the time differences between each message, and use that number sequence as your feed into the algorithm. at that point, you can do your analysis based on statistical properties, or perhaps a fuzzy logic algorithm. maybe even some sort of monte carlo algorithm in a bounded 1-dimension.

if you were thinking something like a neural net, i suspect that would be very hard to train, or at least take many many iterations. not impossible, just not what i think is the most efficient way to solve the problem.

i hope this isn't a request to help you with your homework assignment :p
 

Nabi

New Member
Jun 9, 2018
3
0
1
Thanks all, it was just a general question to see if ML can help in such case :)