I'm trying to create a simple shell script to monitor my server. I plan to set up a CRON job to run it every five or 10 minutes.
Here's how it will work:
- Run a number of linux commands e.g. iostat, mpstat, top, etc. and output the results to a text file
- Send the text file via CURL to a URL that will receive the text file and process the data, and then post important metrics to a database
I plan to use this data to determine when I need to have my server upgraded.
However, I don't have much experience with server monitoring so I don't know what kind of thresholds I should be looking out for. For example, when I run something like
mpstat -P ALL, what kind of figures should bother me? Or
I just want to be able to have some kind of point of reference to know when my servers are in a good state i.e. reasonable load, or in a bad state i.e. overloaded, and require upgrade or load-balancing.
Thanks in advance.