Netdata Community

Can Netdata monitor and show stats for multi tenant servers?

Hello,

I run a small WordPress managed hosting company for custom WordPress projects. The amount of sites Im hosting is growing and I need a tool that would help me to keep my fingers on the pulse of the sites on my servers and sites. In short, I need to see stats per site, not per server.

I just came across Netdata app and it looks brilliant and has all the bells and whistles I need. However, I am not sure if it will work for me.
I host websites(mostly WordPress) and some sites small enough to share a server. The problem with similar tools such as Netdata, they show general stats across the whole server. Which is fine, but doesn’t give me enough granularity to pinpoint the offenders. Does NEtdata provide such an option?

Thank you

It really depends on the type of metrics you’d be interested in, at a site level. Let’s say you just want weblog metrics, like the ones you can see at netdata dashboard

To have that at a per site level without rewriting/modifying the collector, you’d probably have to configure your web server to store the logs in different files, one per site. Then you can configure the weblog collector as explained in Monitor Nginx or Apache web server log files with Netdata | Learn Netdata

But there are many more metrics that Netdata collects, that can’t be split as easily. Now if you had one docker container per site, that would be a different thing, a lot more possibilities to see info per site then.

@Alex_reds Do you use a single WordPress installation with “Wordpress multisite” to handle multiple sites with a single WordPress installation, or do you use a separate WordPress installation + separate web server config for each site? I think the approach will differ depending on what your configuration is (you’ll also see better performance with the multisite config, as PHP caches will be used more effectively rather than caching multiple different copies of the same files).

For what it’s worth, I do this on all my servers using the following setting in /etc/nginx/nginx.conf:

access_log /var/log/nginx/access.$server_name.log;

which will create files like access.example.com.log for hits to example.com.

You do need to manually touch the files once though, otherwise Nginx will hit an access denied error the first time it tries to write to the log. Once you’ve manually created them once, it should be fine as logrotate will handle rotation properly.

1 Like