hetrixtools / agent

HetrixTools Server Monitoring Agent (Linux)
https://hetrixtools.com/uptime-monitor/
88 stars 29 forks source link

Agent cannot find php5.6-fpm and php7.2-fpm services #10

Closed n3storm closed 6 years ago

n3storm commented 6 years ago

The point is php5.6-fpm and php7.2-fpm daemons both name php-fpm their processes (this why I had to specify php-fpm or agent will tell both services are down), so we will not know if one of the two daemons is down until both are down.

My suggestion is to use systemd service status (yeah, I know) in case is available, otherwise fallback to ps -ef

hetrixtools commented 6 years ago

Thank you for bringing this up to our attention. Your idea of using systemd (if available) is good.

Can you please see if these changes are solving your issues: https://github.com/hetrixtools/agent/pull/11/commits/fc19ad8c5bd9bb32d6a4fb5c110eb2f35c1551a2

We have tested it on several environments and it appears to address the issues that you have described.

n3storm commented 6 years ago

In other to check changes I replaced function servicestatus() with new one. And it works :)

Just to let you know: Previously I replaced completely hetrixtools_agent.sh with the new version, and setup up CheckServices="" and SID="SIDPLACEHOLDER" with our server values, and script didn't work. Log was complaining at some awk parsing, not sure where.

hetrixtools commented 6 years ago

Just to let you know: Previously I replaced completely hetrixtools_agent.sh with the new version, and setup up CheckServices="" and SID="SIDPLACEHOLDER" with our server values, and script didn't work. Log was complaining at some awk parsing, not sure where.

Couldn't reproduce this issue using the latest agent file.

We've pushed this patch onto the main branch now, so you can now follow the regular agent installation flow and see if you still encounter any issues with awk parsing. If you do, please specify on which OS you're encountering the issues.

n3storm commented 6 years ago

Ok. Thank you very much.

Just to be sure, if I reinstall agent now from hetrixtools dashboard I will get this new version? or should I wait longer?

hetrixtools commented 6 years ago

Just to be sure, if I reinstall agent now from hetrixtools dashboard I will get this new version? or should I wait longer?

You will get the new version, yes.

n3storm commented 6 years ago

Checked and is working OK. Thank you very much :)

hetrixtools commented 6 years ago

You're very welcome. And thank you for raising this issue and for your feedback. Going to close this issue now. Have a great day.