Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rrdtool fetch issue with rrdcached and unix socket #1184

Open
earendilfr opened this issue Aug 5, 2022 · 0 comments
Open

rrdtool fetch issue with rrdcached and unix socket #1184

earendilfr opened this issue Aug 5, 2022 · 0 comments

Comments

@earendilfr
Copy link

Describe the bug
I have a a strange issue with rrdtool and rrdcached.
I try to fetch data:

when I try to retrieve it through the TCP socket,it's working fine:

$ rrdtool fetch <device>/port-id4452.rrd AVERAGE --start now-800 --end now --daemon localhost:42217
                       INOCTETS           OUTOCTETS            INERRORS           OUTERRORS         INUCASTPKTS        OUTUCASTPKTS        INNUCASTPKTS       OUTNUCASTPKTS          INDISCARDS         OUTDISCARDS     INUNKNOWNPROTOS     INBROADCASTPKTS    OUTBROADCASTPKTS     INMULTICASTPKTS    OUTMULTICASTPKTS

1659724500: 2.6440111531e+04 3.0643290155e+04 0.0000000000e+00 0.0000000000e+00 9.0721785798e+01 9.3000295559e+01 -nan -nan 0.0000000000e+00 0.0000000000e+00 -nan 7.5942754919e-01 1.2849809131e+02 2.2139606440e+01 2.1586345182e+01
1659724800: 2.3870372267e+04 3.0900674729e+04 0.0000000000e+00 0.0000000000e+00 8.7565268466e+01 9.1373657930e+01 -nan -nan 0.0000000000e+00 0.0000000000e+00 -nan 7.7754919499e-01 1.2859880791e+02 2.2167525343e+01 2.1557375749e+01
1659725100: 2.2333918381e+04 3.0861986977e+04 0.0000000000e+00 0.0000000000e+00 8.6070902326e+01 9.0101060465e+01 -nan -nan 0.0000000000e+00 0.0000000000e+00 -nan 8.1860465116e-01 1.2887231628e+02 2.2211572093e+01 2.1502474419e+01
1659725400: -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan

But when I try with the unix socket, I receive a message that indicate that the file doesn't exist:

$ rrdtool fetch <device>/port-id4452.rrd AVERAGE --start now-800 --end now --daemon unix:/run/rrdcached.sock
ERROR: realpath(<device>/port-id4452.rrd): Aucun fichier ou dossier de ce type

And if I indicate the full path it's working fine:

$ rrdtool fetch /opt/librenms/rrd/<device>/port-id4452.rrd AVERAGE --start now-800 --end now --daemon unix:/run/rrdcached.sock
                       INOCTETS           OUTOCTETS            INERRORS           OUTERRORS         INUCASTPKTS        OUTUCASTPKTS        INNUCASTPKTS       OUTNUCASTPKTS          INDISCARDS         OUTDISCARDS     INUNKNOWNPROTOS     INBROADCASTPKTS    OUTBROADCASTPKTS     INMULTICASTPKTS    OUTMULTICASTPKTS

1659725400: 2.2009036977e+04 3.0347161739e+04 0.0000000000e+00 0.0000000000e+00 8.4773996433e+01 8.9116496767e+01 -nan -nan 0.0000000000e+00 0.0000000000e+00 -nan 8.4015607581e-01 1.2821055920e+02 2.2154971683e+01 2.0771030546e+01
1659725700: 2.2475673401e+04 2.9771365780e+04 0.0000000000e+00 0.0000000000e+00 8.5310682637e+01 8.9167404008e+01 -nan -nan 0.0000000000e+00 0.0000000000e+00 -nan 8.2434004822e-01 1.2650634933e+02 2.2121673278e+01 2.0331223717e+01
1659726000: -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan -nan

Did it's normal ?

Desktop (please complete the following information):

  • OS: Debian 11
  • rrdtool version: 1.7.2
  • rrdcached version: 1.7.2

Configuration of rrdcached

# /etc/default file for RRD cache daemon

# Full path to daemon
DAEMON=/usr/bin/rrdcached

# Optional override flush interval, in seconds.
WRITE_TIMEOUT=1800

# Optional override maximum write delay, in seconds.
WRITE_JITTER=1800

# Optional override number of write_threads
WRITE_THREADS=4

# Where database files are placed.  If left unset, the default /tmp will
# be used.  NB: The daemon will reject a directory that has symlinks as
# components.  NB: You may want to have -B in BASE_OPTS.
BASE_PATH=/opt/librenms/rrd/

# Where journal files are placed.  If left unset, journaling will
# be disabled.
JOURNAL_PATH=/var/lib/rrdcached/journal/

# FHS standard placement for process ID file.
PIDFILE=/var/run/rrdcached.pid

# FHS standard placement for local control socket.
SOCKFILE=/run/rrdcached.sock

# Optional override group that should own/access the local control
# socket
SOCKGROUP=librenms

# Optional override access mode of local control socket.
#SOCKMODE=0660

# Optional unprivileged group to run under when daemon.  If unset
# retains invocation group privileges.
DAEMON_GROUP=librenms

# Optional unprivileged user to run under when daemon.  If unset
# retains invocation user privileges.
DAEMON_USER=librenms

# Network socket address requests.  Use in conjunction with SOCKFILE to
# also listen on INET domain sockets.  The option is a lower-case ell
# ASCII 108 = 0x6c, and should be repeated for each address.  The
# parameter is an optional IP address, followed by an optional port with
# a colon separating it from the address.  The empty string is
# interpreted as "open sockets on the default port on all available
# interfaces", but generally does not pass through init script functions
# so use -L with no parameters for that configuration.
#NETWORK_OPTIONS="-L"

# Any other options not specifically supported by the script (-P, -f,
# -F, -B).
BASE_OPTIONS="-B -F -R -L ''"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant