无法解析身份验证凭据 [关闭]
Posted
技术标签:
【中文标题】无法解析身份验证凭据 [关闭]【英文标题】:Unable to parse authentication credentials [closed] 【发布时间】:2021-12-15 05:51:07 【问题描述】:我已经为 nagios 和 grafana 集成设置了一个 Influxdb 我已经配置了所有内容 文件位于 nagflux/perfdata 文件夹中 但我执行时无法获取任何有关流入的数据
curl -G “http://localhost:8086/query?db=nagios&pretty=true” --data-urlencode “q=show series”
“error”: “unable to parse authentication credentials”
我创建了数据库“nagios”和具有管理员权限的用户 nagios。
也在influx的配置文件中
[monitor]
Whether to record statistics internally.
store-enabled = true
The destination database for recorded statistics
store-database = “nagios”
The interval at which to record statistics
store-interval = “20s”
[http]
Determines whether HTTP endpoint is enabled.
enabled = true
Determines whether the Flux query endpoint is enabled.
flux-enabled = false
The bind address used by the HTTP service.
bind-address = “:8086”
Determines whether user authentication is enabled over HTTP/HTTPS.
auth-enabled = true
The default realm sent back when issuing a basic auth challenge.
realm = “InfluxDB”
Determines whether HTTP request logging is enabled.
log-enabled = true
and in Nagflux
Main file processing configuration
[main]
#NagiosThe location of the performance data, here is the directory copied from our script
NagiosSpoolfileFolder = “/usr/local/nagflux/spool/nagfluxperfdata”
NagiosSpoolfileWorker = 1
InfluxWorker = 2
MaxInfluxWorker = 5
#File location just specify one
DumpFile = “/usr/local/nagflux/log/nagflux/nagflux.dump”
#This is the temporary storage directory of nagflux
NagfluxSpoolfileFolder = “/usr/local/nagflux”
FieldSeparator = “&”
BufferSize = 1000
FileBufferSize = 65536
#Save target we use Influxdb
DefaultTarget = “Influxdb”
#Log save settings
[Log]
LogFile = “/usr/local/nagflux/log/nagflux.log”
MinSeverity = “INFO”
#ubfluxdb global settings, mainly to allow the creation of a database
[InfluxDBGlobal]
CreateDatabaseIfNotExists = true
NastyString = “”
NastyStringToReplace = “”
HostcheckAlias = “hostcheck”
#Specify the database, NagiosPerfdata here is the database name, it will be created automatically
[InfluxDB “nagios”]
Enabled = true
Version = 1.4.2
#influxdb API interface address, the default is port 8086
Address = " http://localhost:8086 "
#Specify the user name and password here, must have administrator rights
Arguments = “precision=ms&u=nagios&p=xxxxxx&db=nagios”
StopPullingDataIfDown = true
#This configuration here is mainly to eliminate errors that have been reported in the log. If there is no livestatu$
[Livestatus]
Type = “tcp”
Version = “Icinga2”
nagflux的日志文件返回
2021-10-30 12:32:36 Info: Is InfluxDB(nagios) running: false
你能帮忙解决一下涌入吗?
【问题讨论】:
【参考方案1】:案例可以关闭问题是在 nagflux 上的文件配置上的文件配置的访问权限
【讨论】:
以上是关于无法解析身份验证凭据 [关闭]的主要内容,如果未能解决你的问题,请参考以下文章
错误域 = MCOErrorDomain 代码 = 5 “无法使用当前会话的凭据进行身份验证。”