Coder Social home page Coder Social logo

longview's Introduction

Linode Longview

Overview

Longview is a system level statistics collection and graphing service, powered by the Longview open source software agent that can be installed onto any Linux system. The Longview agent collects system statistics and sends them to us, where we store the data and present it in beautiful and meaningful ways.

Preview

The Linode Manager allows you to interact with data collected and analyze your system's resource usage. You can drill into individual servers:

Longview preview

Linode Longview also gives you a high-level view of your fleet and lets you sort your servers' resource usage by the metrics that matter to you:

Longview preview

Features

  • Compatibility with Linux-based operating systems, Linode and non-Linode.
  • An open-source software agent
  • Up-to-the-minute information about each system
  • Overview dashboard for all systems
  • Zoomable graphs with contextual tooltips
  • Overall stats for CPU, memory, disk IO, listening services, active connections, network transfer, system details, and more
  • Per-process statistics including process count, IO, memory, and CPU usage
  • Longview Pro includes unlimited data retention and up to 1 minute resolution
  • Longview Free includes 12 hours of data retention and 5 minute resolution

Linode Docs on Longview

The Linode Guide & Tutorials contains more information on Longview's features at: Longview

Requirements

Perl

The Longview client requires perl 5.8 or higher.

Kernel

The Longview client should be running with a 2.6 or higher kernel.

Operating system

The Longview client can be installed on any system running Linux. Linode provides packages for Debian, Ubuntu, CentOS, and Fedora. A tagged release tarball is provided for systems without a pre-rolled package.

Client usage

Installation

The client is normally installed by running a one-liner provided by the Linode Manager, which will automatically detect your operating system and drop your client's API key onto the filesystem.

The client installs itself to /opt/linode/longview and will drop the API key under /etc/linode/longview.key.

Alternately, you can obtain a full copy of the repository, which will allow the Extras/install-dependencies.sh script to install (using cpanm) all required perl modules in a lib directory in your local copy of the repository.

Running the Longview client

The Longview client runs automatically after being installed and configures itself to run at boot time. You can also start it by running:

service longview start

The client logs information to /var/log/linode/longview.log. The Longview client logs error messages by default. If you'd like more verbose logs, you can manually start the client in debug mode by running:

/opt/linode/longview/Linode/Longview.pl debug

The client will daemonize itself and print each stage of data collection to the log file, along with the response received by the server. This can be extremely helpful in diagnosing restrictive firewall issues and assisting Linode support in getting Longview to cooperate on any system.

Stopping the Longview client

The Longview client can be stopped in a similar fashion to starting it:

service longview stop

This will halt data collection and the graphs on the Linode Manager's "Longview" tab will not continue to update.

Removing the Longview client

The client will stop itself once you remove it from the Linode Manager. You can uninstall it by using your package manager.

longview's People

Contributors

alexfornuto avatar ddevault avatar dorthu avatar dwfreed avatar fly avatar hoelzro avatar hvhvhcgv avatar jamesottinger avatar rmp avatar robertderose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

longview's Issues

When nginx is installed, panel won't show stats after it has been configured

When you first install the package on a server running nothing more than nginx, the panel will not show any stats of the system regardless of it being running already.

You have to configure nginx to give stats to longview for it to start logging data, not even data related to basic system stats. I don't know what happens if you don't have nginx installed.

My servers are running CentOS 7

MongoDB support...

...would be awesome! But is this package actively maintained? I see three open PRs and only 6 issues in 4 months.

Longview is great, get some more marketing!

Failed to fetch http://apt-longview.linode.com/dists/trusty/main/binary-amd64/Packages 403

W: Failed to fetch http://apt-longview.linode.com/dists/trusty/main/binary-amd64/Packages 403 Forbidden [IP: 112.124.140.210 80]

W: Failed to fetch http://apt-longview.linode.com/dists/trusty/main/binary-i386/Packages 403 Forbidden [IP: 112.124.140.210 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linode-longview

Arch linux installation

Hi there I'm trying to install this on Arch linux

In what format should the /etc/linode/longview.key be in? Just the API key as a text string?

OpenVZ w/ UBC (User Bean Counters) - meminfo Buffers: not defined

Identified by; Existence of /proc/user_beancounters file.
Reproducible; Always
Workaround; Possibly upgrading to OpenVZ w/ VSwap, CentOS 6 on hardware node, or silencing error in file;

/opt/linode/longview/Linode/Longview/DataGetter/Memory.pm

Line 50;

( $dataref->{LONGTERM}->{'Memory.real.buffers'} ) = ( $meminfo =~ /Buffers:\s+(\d+)/ )[0] + 0;

Effect; (Every 30-31 seconds, or 5 minutes, a error is written in file:)

/var/log/linode/longview.log;
03/31 11:05:28 WARN Longview[22508] - Use of uninitialized value in addition (+) at /opt/linode/longview/Linode/Longview/DataGetter/Memory.pm line 50.

Steps to Authenticate; (Free shows 0 Buffers, but meminfo doesn't show Buffers.)

free -m
             total       used       free     shared    buffers     cached
Mem:           192        148         43          0          0         66
-/+ buffers/cache:         81        110
Swap:          192         45        146

cat /proc/meminfo
MemTotal:         196608 kB
MemFree:           44860 kB
Cached:            68152 kB
Active:            68708 kB
Inactive:          31604 kB
Active(anon):      16040 kB
Inactive(anon):    16120 kB
Active(file):      52668 kB
Inactive(file):    15484 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:        196608 kB
SwapFree:         150000 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         32160 kB
Shmem:              6140 kB
Slab:              51420 kB
SReclaimable:      45048 kB
SUnreclaim:         6372 kB

Longview can't auto-create MariaDB creds on Debian 9

mysql_password=$(egrep '^\s*password\s*=\s*' /etc/mysql/debian.cnf | head -n1 | sed 's/^\s*password\s*=\s*//')
should be adjusted to fetch the username associated with the "Upgrades" account. In Debian9 with MariaDB (which is a silent replacement for mysql-server) this account is now "root" rather than "debian-sys-maint".


Seen during Longview Client install:

Unable to automatically configure MySQL plugin:

Longview has detected MySQL running on this server but was unable to automatically configure the connection. To allow Longview to access your MySQL instance please run the following queries:


root@debian:~# cat /etc/mysql/debian.cnf
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = root
password =
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = root
password =
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr

Support for MariaDB

Since CentOS 7, mysql has been replaced by MariaDB. I supposed it would be no issue at all, but it seems the necessary modules are not installed since mysql is never actually installed. Is there a workaround? Is support assigned on a milestone already?

Enhancement: Varnish Cache Reporting in Longview

I'd like to add a feature request to have Longview report on Varnish Cache stats & activity. It's great to see Nginx and MySQL stats in Longview, but many of us are also using Varnish as either the point-of-entry on port 80 or behind Nginx as a SSL endpoint on 443. Initially, you could reuse the existing nginx UI reports, and varnishlog is extremely verbose with fast queries. Future updates could include other Varnish-specific metrics like cache space used, cache hits vs fetches, etc.

Happy to discuss further if anyone's interested...

FreeBSD support?

Though FreeBSD is not officially supported by Linode, I've been running a FreeBSD node for months and it's working well. Wanted to know if Longview is considering supporting other POSIX platforms... "Linux-only" sounds too fancy in open source world... :)

Disks Metrics Not Catching ZFS Pool

Installed Longview on a file server out of curiosity to see the disk stats, but it doesn't see the main storage pool - ZFS on ubuntu. Any plans to add ZFS compatibility to the disk section of Longview? Thanks!

LWP::Protocol::https is needed for v1.1-5 to run

First time I run into this issue. Today I installed longview on a new machine and it wouldn't start logging because of a missing package, related to Perl. I also updated longview on other machines (updated the whole machine) that were running almost since a year ago, and had no issues. Machines are all running CentOS 7 but only the one with the issue was created just a month ago. All three of them were updated at the same time and only the new one presented the issue. I would think it is related with perl dependencies but still the longview installer can take care of this issue.

The missing yum package is perl-LWP-Protocol-https. After installing the package everything worked as expected.

Log with errors

05/06 15:22:24 INFO Longview[3975] - Starting Longview Agent version 1.1.5 05/06 15:22:24 INFO Longview[3976] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Memory.pm 05/06 15:22:24 INFO Longview[3976] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/CPU.pm 05/06 15:22:24 INFO Longview[3976] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Processes.pm 05/06 15:22:24 INFO Longview[3976] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Network.pm 05/06 15:22:24 INFO Longview[3976] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Disk.pm 05/06 15:22:24 INFO Longview[3976] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/SysInfo.pm 05/06 15:22:24 INFO Longview[3976] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Ports.pm 05/06 15:22:24 INFO Longview[3976] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Applications/MySQL.pm 05/06 15:22:24 INFO Longview[3976] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Applications/Nginx.pm 05/06 15:22:24 INFO Longview[3976] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Applications/Apache.pm 05/06 15:22:24 INFO Longview[3976] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Packages/YUM.pm 05/06 15:22:24 INFO Longview[3976] - Start up complete 05/06 15:22:28 WARN Longview[3976] - Unable to find a location for the Nginx status page, defaulting to http://127.0.0.1/nginx_status 05/06 15:22:28 ERROR Longview[3976] - Unable to access server status page (http://127.0.0.1/nginx_status) for Nginx: 404 Not Found 05/06 15:22:28 INFO Longview[3976] - 501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed) 05/06 15:22:28 INFO Longview[3976] - LWP will support https URLs if the LWP::Protocol::https module is installed.

Log when running correctly
05/06 22:28:12 INFO Longview[31993] - Starting Longview Agent version 1.1.5 05/06 22:28:12 INFO Longview[31994] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Memory.pm 05/06 22:28:12 INFO Longview[31994] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/CPU.pm 05/06 22:28:12 INFO Longview[31994] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Processes.pm 05/06 22:28:12 INFO Longview[31994] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Network.pm 05/06 22:28:12 INFO Longview[31994] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Disk.pm 05/06 22:28:12 INFO Longview[31994] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/SysInfo.pm 05/06 22:28:12 INFO Longview[31994] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Ports.pm 05/06 22:28:12 INFO Longview[31994] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Applications/MySQL.pm 05/06 22:28:12 INFO Longview[31994] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Applications/Nginx.pm 05/06 22:28:12 INFO Longview[31994] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Applications/Apache.pm 05/06 22:28:12 INFO Longview[31994] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Packages/YUM.pm 05/06 22:28:12 INFO Longview[31994] - Start up complete 05/06 22:28:14 WARN Longview[31994] - Unable to find a location for the Nginx status page, defaulting to http://127.0.0.1/nginx_status

MarioDB is not supported

Despite this post from 2015, to make Longview work with MariaDB I had to change /opt/linode/longview/Linode/Longview/DataGetter/Applications/MySQL.pm, from:

our $SIGNATURES = ['mysqld'];

To:

our $SIGNATURES = ['mariadbd'];

Digging around in there was not obvious and wasted a lot of time.

Need to update repo before installing in `rpm_install()`

rpm_install() (from https://lv.linode.com/<your-id>) needs to run yum update after installing the new repo file and before running yum install linode-longview. Otherwise the package repository will not be aware of the new package.

Generic installation problem

I'm trying installing Longview from Linode Manager, which is a way prompts the following message to instruct installation:

curl -s https://lv.linode.com/<some identifier> | sudo bash

I used this way to get Longview installed on my Gentoo server, and the installation script selected generic_install(), which has something wrong with the code will run when has_git() returns 0.

Then forcing has_git() always returning 1 made the installation succeeded. This problem is still exist at the moment I post this. I can't think of anywhere but here to post this problem.

Support Alpine

One of the main reason I use Linode is because they officially support Alpine Linux, so it'd be nice if the Longview installer also support Alpine Linux.

Question on implementation - constant_push?

Hello,

I'm making a Go port of Longview client here: https://github.com/kmansoft/longview-go

Have a question about constant_push

What is the meaning of this function? What does it do?

It seems (I added logging) that the client always just sends the most recent snapshot to the server and all historical averaging is handled by the server.

And so data->payload is a one-element array containing only just the most recently collected data item. There is no historical data on the agent side.

Is this correct?

CentOS 8 can't install longview, why?

Because Linode even didn't prepare for the new version of lonview.

Figure out the problem:
I followed the installation instructions, enter this command with root:
curl -s https://lv.linode.com/xxxxx | sudo bash
And this is the response I got:

Longview Repo                                                                             81  B/s | 233  B     00:02
Error: Failed to synchronize cache for repo 'longview'

After then I check the repository file in the path "/etc/yum.repos.d/longview.repo".

[longview]
name=Longview Repo
baseurl=https://yum-longview.linode.com/centos/8/noarch/
enabled=1
gpgcheck=1

Then I tried to find out the problems. First, check the "baseurl" of the repository.
This is the result that they don't put the link of version 8. screenshot

Try to solve it:
OK, I thought maybe this old version still works fine in CentOS 8.
I modified the repository file "/etc/yum.repos.d/longview.repo"

[longview]
name=Longview Repo
baseurl=https://yum-longview.linode.com/centos/7/noarch/
enabled=1
gpgcheck=1

Then I followed the manual Installation to install longview. These are the error message after I entered yum install linode-longview:

Last metadata expiration check: 0:16:10 ago on Sat 12 Oct 2019 01:18:35 PM CST.
Error:
 Problem: cannot install the best candidate for the job
  - nothing provides perl(Crypt::SSLeay) needed by linode-longview-1.1-5.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Do anyone has experience install longview on CentOS 8?
Or can anyone point out which step I got wrong?

install_driver(mysql) failed: Can't locate DBD/mysql.pm

Problem

About ~12h after setting up the longview client on a Linode VPS the backoffice hasn't still received any data.

Steps followed:

  1. Started a new Linode 1024 instance with the official Debian 8 image.
  2. Installed nginx 1.10 (dotdeb PPA) and MySQL 5.7 (official PPA)
  3. Installed the longview client. Tried both automatic and manual installations with exactly the same results.

Logs

# cat /var/log/linode/lonview.log
03/16 21:17:29 INFO Longview[3373] - Starting Longview Agent version 1.1.5
03/16 21:17:29 INFO Longview[3393] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Processes.pm
03/16 21:17:29 INFO Longview[3393] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Disk.pm
03/16 21:17:29 INFO Longview[3393] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Network.pm
03/16 21:17:29 INFO Longview[3393] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/CPU.pm
03/16 21:17:29 INFO Longview[3393] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Ports.pm
03/16 21:17:29 INFO Longview[3393] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Memory.pm
03/16 21:17:29 INFO Longview[3393] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/SysInfo.pm
03/16 21:17:29 INFO Longview[3393] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Applications/MySQL.pm
03/16 21:17:29 INFO Longview[3393] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Applications/Apache.pm
03/16 21:17:29 INFO Longview[3393] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Applications/Nginx.pm
03/16 21:17:29 INFO Longview[3393] - Loading module /opt/linode/longview/Linode/Longview/DataGetter/Packages/APT.pm
03/16 21:17:29 INFO Longview[3393] - Start up complete
03/16 21:17:30 WARN Longview[3393] - install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (you may need to install the DBD::mysql module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl . /opt/linode/longview/Linode/../ /opt/linode/longview/Linode/../lib/perl5 /opt/linode/longview/Linode/../lib/perl5/x86_64-linux-gnu-thread-multi/ /opt/linode/longview/Linode/../usr/include) at (eval 666) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.

Service Status

# service longview status
โ— longview.service - LSB: Longview Monitoring Agent
   Loaded: loaded (/etc/init.d/longview)
   Active: active (exited) since Fri 2017-03-16 21:17:29 UTC; 34s ago
  Process: 3367 ExecStart=/etc/init.d/longview start (code=exited, status=0/SUCCESS)

Mar 16 21:17:29 debian longview[3367]: Starting Longview Agent: longview.
Mar 16 21:17:29 debian systemd[1]: Started LSB: Longview Monitoring Agent.

Longview Panel

Longview

404 During Longview Update Attempt

Attempted to updated packages this morning with sudo apt update && sudo apt upgrade and got the following 404 error associated with the longview Release.

Hit:1 http://mirrors.linode.com/ubuntu jammy InRelease
Hit:2 http://mirrors.linode.com/ubuntu jammy-updates InRelease
Hit:3 http://mirrors.linode.com/ubuntu jammy-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Ign:5 http://apt-longview.linode.com jammy InRelease
Err:6 http://apt-longview.linode.com jammy Release
  404  Not Found [IP: 2600:3c03::f03c:91ff:feba:159b 80]
Hit:7 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:8 https://esm.ubuntu.com/apps/ubuntu jammy-apps-security InRelease [7,553 B]
Hit:9 https://packages.redis.io/deb jammy InRelease
Get:10 https://esm.ubuntu.com/apps/ubuntu jammy-apps-updates InRelease [7,456 B]
Get:11 https://esm.ubuntu.com/infra/ubuntu jammy-infra-security InRelease [7,450 B]
Get:12 https://esm.ubuntu.com/infra/ubuntu jammy-infra-updates InRelease [7,449 B]
Get:13 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [890 kB]
Get:14 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Packages [622 kB]
Get:15 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en [175 kB]
Hit:16 http://ppa.launchpad.net/ondrej/apache2/ubuntu jammy InRelease
Hit:17 http://ppa.launchpad.net/ondrej/php/ubuntu jammy InRelease
Reading package lists... Done
E: The repository 'http://apt-longview.linode.com jammy Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Debian Stretch (testing) doesn't have 1.1.5 available from the linode apt repository

At the moment, the latest version in stretch is 1.1.4. Sid (unstable) and Jessie (stable) both seem to have it - why doesn't testing?

See https://apt-longview.linode.com/dists/stretch/main/binary-amd64/Packages:

Package: linode-longview
Version: 1.1.4
Architecture: all
Maintainer: Linode Longview Team [email protected]
Installed-Size: 236
Depends: libjson-perl, libwww-perl, libcrypt-ssleay-perl | liblwp-protocol-https-perl, libio-socket-ssl-perl, libio-socket-inet6-perl, liblog-loglite-perl, libtry-tiny-perl, libdbi-perl, liblinux-distribution-perl, debconf (>= 0.5) | debconf-2.0, perl
Homepage: https://www.linode.com/longview/
Priority: optional
Section: utils
Filename: pool/main/l/linode-longview/linode-longview_1.1.4_all.deb
Size: 25676
SHA256: b080ce8ea866b0243dbc149702cd207a90a8508e4f3355d5f82781e4a895168d
SHA1: e3bcac5d6441aec9ca6064fcce07968b9fdd1b01
MD5sum: 9b2463d8cf480f4a8af9ce8462cdfa56
Description: Longview Monitoring Agent
This agent collects various system wide statistics and
post them to the Longview collection endpoint.

no repo for Fedora >= 22

These are missing:
https://yum-longview.linode.com/fedora/22/noarch/
https://yum-longview.linode.com/fedora/23/noarch/

My workaround is to:

  1. Log into SSH and run the install command from longview e.g.
    curl -s https://lv.linode.com/..

You then will get the following error:
Failed to synchronize cache for repo 'longview', disabling.

  1. Change the baseurl.
    nano /etc/yum.repos.d/longview.repo

set the baseurl to fedora 21:
baseurl=https://yum-longview.linode.com/fedora/21/noarch/

  1. Install longview with missing perl dependency.
    dnf install linode-longview perl-LWP-Protocol-https

Support for PostgresSQL

I would like to see support for PostgresSQL added to longview, to pull stats and information like what it does for MySQL.

Error during installing LWP::UserAgent

While running the curl command and after answering Yes to the prompt to configure Nginx:

Preconfiguring packages ...
Checking Nginx configuration...
Can't locate LWP/UserAgent.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .).
BEGIN failed--compilation aborted.
Can't locate LWP/UserAgent.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .).
BEGIN failed--compilation aborted.
Selecting previously unselected package libcommon-sense-perl.

Not reporting incoming network traffic for some minutes

In my longview graph I have several minutes a day where it is not reporting any number for incoming network traffic. The graph represents it as zero bytes, but it doesn't actually display a value so it may be invalid, or negative or something else. My server logs tell me that i have an normal amount of traffic on those minutes so this is an error with the collector or longview web interface itself

networkdrops

MySQL agent does not work if using non-standard socket

My server's socket is /tmp/mysql.sock, Perl DBI:MySQL is hard coded to '/var/lib/mysql/mysql.sock'.

Rather than create a symlink, I modified line 69 in DataGetter/Applications/MySQL.pm, adding my specific socket.

my $dbh = DBI->connect_cached( "DBI:mysql:host=localhost;mysql_socket=/tmp/mysql.sock;", $creds->{username}, $creds->{password} ) or do {

It would be better if I could provide a non-default socket in the Longview MySQL configuration file.

data getter for processes shouldn't assume that every uid has pwd entry

Processes can run (e.g. inside docker containers) with user ids that don't have valid pwd entries on the host system. The code at

$proc{user} = ( getpwuid( $proc{uid} ) )[0];
seems to assume otherwise:

$proc{user} = ( getpwuid( $proc{uid} ) )[0];

$proc{user} is later used in

$dataref->{LONGTERM}->{"Processes.${info{name}}.${info{user}}.count"}++;
$dataref->{LONGTERM}->{"Processes.${info{name}}.${info{user}}.mem"} += $info{mem} + 0;
$dataref->{LONGTERM}->{"Processes.${info{name}}.${info{user}}.cpu"} += $info{cpu} if (defined $info{cpu});
$dataref->{LONGTERM}->{"Processes.${info{name}}.${info{user}}.ioreadkbytes"} += $info{ioreadkbytes} if (defined $info{ioreadkbytes});
$dataref->{LONGTERM}->{"Processes.${info{name}}.${info{user}}.iowritekbytes"} += $info{iowritekbytes} if (defined $info{iowritekbytes});
$dataref->{LONGTERM}->{"Processes.${info{name}}.${info{user}}.zz_age"} = $info{age}
if ((!defined($dataref->{LONGTERM}->{"Processes.${info{name}}.${info{user}}.zz_age"} )) ||
$info{age} > $dataref->{LONGTERM}->{"Processes.${info{name}}.${info{user}}.zz_age"} );
and results in hundreds of warning in the log file, repeated every 5 minutes:

04/21 09:51:35 WARN Longview[6907] - Use of uninitialized value $info{"user"} in concatenation (.) or string at /opt/linode/longview/Linode/Longview/DataGetter/Processes.pm line 101.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.