Common Netdata Tasks

Update Netdata

/usr/libexec/netdata/netdata-updater.sh

Renaming a Node

You can change the node name in the Netdata web interface. Instead you can change hostname of the node directly on the node. Sometimes the node name doesn’t use the entire hostname, to override the hostname you can edit the /etc/netdata/netdata.conf and uncomment the hostname section and provide the correct hostname.

https://community.netdata.cloud/t/how-do-i-rename-a-node/1068

Moving a Node to a different War Room

https://community.netdata.cloud/t/how-do-i-move-a-node-to-another-war-room/1069

NetData Installation or Upgrade – Permission Denied Temp Directory not Executable

You might have run into the following issue at some point when trying to install or upgrade Netdata.

Shell

It’s usually related to your /tmp folder is mounted without execution permission and doesn’t allow execution of programs from this location. A simple work around is to set the $TMPDIR location in your shell to a place that is mount with execution permission. As an example

Shell

Granted you don’t have to use /root/tmp it can be any location.

Litespeed Web Server Statistics in Netdata Including Fixes

Showing MySQL Metrics in Netdata

It’s pretty simple to get this done, as there’s a plugin built in. As per this guide on the Netdata website.

https://app.netdata.cloud/spaces/lmtca-space/rooms/general/nodes/34d04048-ab58-11ea-81cb-5600029faf80#chartName=menu_ebpf&after=-900&before=0

You simple need to run the following commands to create the necessary configuration.

Plain Text

You then update a single line at the bottom of the file. Set path to /tmp/lshttpd/

Plain Text

After restarting Netdata you might find that there is no change to your dashboard. Let’s check the logs….

Plain Text

Since the file .rtreport is actually symlinked to /dev/shm/lsws/status/.rtreport which is owned by nobdy/nogroup. We simply need to add netdata to the nogroup group.

Shell

You should then be able to see the Litespeed section in Netdata Cloud

Litespeed Netdata Cloud Graphs

Setting up MySQL Statistics in Netdata

MySQL Metrics in Netdata

You might noticed MySQL statistics aren’t being show in Netdata. Here’s what I ran into.

Error: “MySQLdb or PyMySQL module is needed to use mysql.chart.py plugin”

The required python libraries for MySQL are missing, so you simply need to install them. For Ubuntu/Debian the following command should correct it.

Shell

Setting up Netdata MySQL User

You might also see these errors in your log.

Plain Text

The fix is simple, add a user called Netdata with a password. Note, you can setup the Netdata user without a password, but this may expose information to the system that you might not want. Full information is located on Netdata’s website.

https://learn.netdata.cloud/docs/agent/collectors/python.d.plugin/mysql

So let’s get Netdata pulling MySQL data.

Fast, open and potentially insecure no password optiom

This will just work, but leave a user on your MySQL instance without a password.

Plain Text

Password based polling

Let’s run the same command as above but give the user a password.

Plain Text

Now we need to tell Netdata the password.

Plain Text

Instead of editing the defaults, go to the bottom of the config and just create a new section with the following

Plain Text

Now you should see MySQL metrics in Netdata

View of MySQL Metrics in Netdata