Setting up Beegfs Mon with Influx v2.7

100 views
Skip to first unread message

Waleed Khalid

unread,
Mar 14, 2024, 4:12:39 AMMar 14
to beegfs-user
Dear All,
I am trying to set up beegfs monitoring with influx 2.7 (as V2 is recommended for beegfs 7.4.2), individually my Grafana interface and my influx database are up and running. However, when I try to set up the beegfs-mon to push data into the database, I get the error :

Mar13 17:42:09 StatsCollector [InfluxDB.cpp:274] >> Writing to InfluxDB failed. responseCode: 401; responseMessage: {"code":"unauthorized","message":"unauthorized access"}

I know this is because I am doing something wrong in the setup of my influx2.7, and this is where I was wondering if someone who has done it before can guide me as to what exact steps are done after installing influx, you don't have to give me the exact commands, even a broader step guide will be highly appreciated, as I know I am missing something but I can't figure out what it is.

Also in beegfs-mon.conf, I have this:

# used by influxdb only
dbDatabase                   = beegfs_mon
dbMaxPointsPerRequest        = 5000
dbSetRetentionPolicy         = true
dbRetentionDuration          = 1d

Is this supposed to be commented out? As influxdbv2 uses buckets and not databases? I also tried setting up the dashboards via the
import-dashboards default command but it also fails to recognize the bucket via the password. This also makes me wonder, if there is a certain way of entering the token for the beegfs-mon. Thank you
Best Regards,
W. Khalid

Trent Anderson

unread,
Mar 14, 2024, 4:28:18 AMMar 14
to beegfs-user
Hi,

I don't have the following explicitly set but they look like default values if they aren't set to I don't think that would be an issue.
dbDatabase                   = beegfs_mon
dbMaxPointsPerRequest        = 5000
dbSetRetentionPolicy         = true
dbRetentionDuration          = 1d


I've put my working config with 2 redactions.
I think the important thing for your error would be the "dbAuthFile = /etc/beegfs/beegfs-mon.auth"

#
# --- Section 1.1: [Basic Settings] ---
#

sysMgmtdHost                 = xxxxxx

#
# --- Section 1.2: [Advanced Settings] ---
#

dbType                       = influxdb2
dbHostName                   = xxxxx
dbHostPort                   = 8086
dbAuthFile                   = /etc/beegfs/beegfs-mon.auth

# used by influxdb V2 only
dbBucket                     = beegfs_mon


collectClientOpsByNode       = true
collectClientOpsByUser       = true
statsRequestIntervalSecs     = 5
httpTimeoutMSecs             = 1000

nodelistRequestIntervalSecs  = 30

curlCheckSSLCertificates     = true

connMgmtdPortTCP             = 8008
connMgmtdPortUDP             = 8008
connPortShift                = 0

connAuthFile                 = /etc/beegfs/connauthfile
connFallbackExpirationSecs   = 900
connMaxInternodeNum          = 3
connInterfacesFile           =
connNetFilterFile            =
connTcpOnlyFilterFile        =

logType                      = logfile
logLevel                     = 3
logNoDate                    = false
logNumLines                  = 50000
logNumRotatedFiles           = 2
logStdFile                   = /var/log/beegfs-mon.log

runDaemonized                = true

tuneNumWorkers               = 4


I think the important thing for your error would be the "dbAuthFile = /etc/beegfs/beegfs-mon.auth"

Here is the contents of ours
# used by influxdb V2 only
organization = <your org>
token = <your token>

And you have to create an influxdb token following https://docs.influxdata.com/influxdb/v2/admin/tokens/create-token/

Cheers

Trent

Waleed Khalid

unread,
Mar 14, 2024, 5:19:44 AMMar 14
to beegfs-user
Dear Trent,
Thank you for the reply! I have the file set there, there I have a question, the username and password section you leave blank correct?
And for organization = MyTestOrg #i.e. without ""
and for token = token123 #again without ""
I will try to modify as per your instructions and get back to you! But maybe your suggestions may fix the issue!

Trent Anderson

unread,
Mar 14, 2024, 5:20:59 AMMar 14
to beegfs-user
Yeah no username or password.

Waleed Khalid

unread,
Mar 14, 2024, 10:42:18 AMMar 14
to beegfs-user
Ah okay thanks, yes it works now. I had a small mistake where I was referencing the database in my .conf as influxdb and not influxdb2. Beegfs-mon is writing data to the influx bucket now, however now I have the issue that grafana dashboards are not set to work with influx2, I tried running the dashboard generator but it gives me the error

Enter Token: {"message":"invalid username or password","traceID":""}


when I enter my token into it. This is what I did

/opt/beegfs/scripts/grafana/import-dashboards default
Select an option:
1. Using BeeGFS Monitoring with Telegraf
2. Using BeeGFS Monitoring without Telegraf
Enter your Option: 2
Please select influxdb version:
1) Influxdb 1.x
2) Influxdb 2.x
Enter your influxdb Verion: 2

Enter Bucket Name:xxxxx
Enter Organizations: xxxx
Enter Token: {"message":"invalid username or password","traceID":""}

Trent Anderson

unread,
Mar 14, 2024, 5:23:34 PMMar 14
to beegfs-user
I created a temporary user in grafana for this. Gave them the permissions required for an import (which was pretty high I think). I deleted this user after the import but once you create the user, cd to /opt/beegfs/scripts/grafana/ and run something like 
sudo ./import-dashboards https://<new_user>:<password>@grafana_url.domain https://grafana_url.domain

Reply all
Reply to author
Forward
0 new messages