Longview and Docker
OS: Ubuntu 16.04 LTS
I installed Longview using the standard installation steps and it installed and started communicating to the Longview dashboard immediately. However, during installation it seems to have detected that Nginx is installed on the machine. It is installed but in a Docker container. (For Bitwarden) Since I do not want to modify the Docker container to add the needed status page to Nginx, is there a way to disable the Longview Nginx module, I have looked but can not seem to find a config file for Longview.
Thanks, Chris
3 Replies
Hey there,
Disabling the app tab of our client isn't part of the current Longview client/server design. That being said, as long as you don't need this service monitored, you can safely ignore any error messages that may appear when accessing this section of Longview.
I hope that helps! -Ryan
Hey Chris,
Thank you very much for that feedback. We have let our people know and we will take a look at your suggestion for future updates to Longview.
Thanks again for taking the time to reach out. If you need anything else don't hesitate to ask!
-Blake
You can actually disable any of the DataGetter
modules used by Longview.
$ ls /opt/linode/longview/Linode/Longview/DataGetter/Applications/
Apache.pm MySQL.pm Nginx.pm
Disabling a Longview application collector
To disable the Nginx collector, for example, you can remove Nginx.pm
or move it elsewhere on your system.
An example of removing it entirely:
$ sudo rm /opt/linode/longview/Linode/Longview/DataGetter/Applications/Nginx.pm
Note: If you think you may need this in the future and don't want to go through the process of reinstalling Longview, the application module can be moved somewhere else on your system, which will have the same effect.
After removing the module, or moving it elsewhere, Longview needs to be restarted for the change to take effect.
$ sudo systemctl restart longview
or
$ sudo /etc/init.d/longview restart
Confirming the change (Optional)
The change can be confirmed by starting the Longview client in debug mode.
$ sudo /etc/init.d/longview stop
$ sudo /etc/init.d/longview debug
If Nginx is enabled, you will see something like the following.
$ tail -f /var/log/linode/longview.log
...
03/19 12:13:43 TRACE Longview[2499] - Collecting memory info
03/19 12:13:43 TRACE Longview[2499] - Collecting network traffic info
03/19 12:13:43 TRACE Longview[2499] - Collecting Process information
03/19 12:13:43 TRACE Longview[2499] - Collecting Disk info
03/19 12:13:43 TRACE Longview[2499] - Collecting CPU info
03/19 12:13:43 TRACE Longview[2499] - Collecting SysInfo
03/19 12:13:43 TRACE Longview[2499] - Entering APT module
03/19 12:13:43 TRACE Longview[2499] - Collecting port information
03/19 12:13:43 TRACE Longview[2499] - Collecting Nginx information
03/19 12:13:43 TRACE Longview[2499] - Posting Data
03/19 12:13:44 DEBUG Longview[2499] - 200 OK
03/19 12:13:44 DEBUG Longview[2499] - {"via":"12","sleep":60}
...
If properly disabled, you will no longer see the line pertaining to Nginx.
$ tail -f /var/log/linode/longview.log
03/19 12:24:56 TRACE Longview[2745] - Collecting memory info
03/19 12:24:56 TRACE Longview[2745] - Collecting network traffic info
03/19 12:24:56 TRACE Longview[2745] - Collecting Process information
03/19 12:24:56 TRACE Longview[2745] - Collecting Disk info
03/19 12:24:56 TRACE Longview[2745] - Collecting CPU info
03/19 12:24:56 TRACE Longview[2745] - Collecting SysInfo
03/19 12:24:56 TRACE Longview[2745] - Entering APT module
03/19 12:24:56 TRACE Longview[2745] - Collecting port information
03/19 12:24:56 TRACE Longview[2745] - Posting Data
03/19 12:24:57 DEBUG Longview[2745] - 200 OK
03/19 12:24:57 DEBUG Longview[2745] - {"via":"60","sleep":60}
...
Once confirmed, you can restart as normal using the appropriate restart
command above.
$ sudo systemctl restart longview
or
$ sudo /etc/init.d/longview restart