Can someone explain?

hi,

Please can someone explain the configuration of InfluxDB on Linux?

I need to know all the config areas and data stores, i am getting forbidden for some hosts when they connect to Influxdb and cant figure out why - so thinking it might be down to perms on a file?

Thanks in advance

The error i get is:

2021-05-11T07:06:54Z E! [outputs.influxdb_v2] When writing to [http://xxx.xxx.xxx.xx:8086]: failed to write metric (403 Forbidden): 403 Forbidden
2021-05-11T07:06:54Z D! [outputs.influxdb_v2] Buffer fullness: 159 / 10000 metrics
2021-05-11T07:06:54Z E! [agent] Error writing to outputs.influxdb_v2: failed to write metric (403 Forbidden): 403 Forbidden

You can post your config part in telegraf " [outputs.influxdb_v2] "

There should be at least a token , below is a part of my settings

[[outputs.influxdb_v2]]
  urls = ["http://127.0.0.1:8086"]

  token = "get this token from chronograf data tokens"
  organization = "Your org"
  bucket = "Telegraf"

https://docs.influxdata.com/influxdb/v2.0/organizations/create-org/
Manage authentication tokens in InfluxDB | InfluxDB OSS 2.0 Documentation ( needs to be read/write)

And if your telegraf is on another machine it may be necessary to open the necessary port on the firewall from the Influx machine.

Hi Thankyou for the reply,

The firewall is open from said machine as can telnet to the ip / port.
The telegraf config is the same as used on the other 150+ servers that are able to connect to InfluxDB (the token is also read / write). - I’m a little stuck with this as unsure why these few servers are forbidden 403 - all i can think is when i moved the data store was wondering if there is another configuration file somewhere that stores the information that needs to be updated or cleared?

Since moving the folders (process below)
Moved the data with Rsync
rsync -a /var/lib/influxdb/ /data/influxdb/

change the locations in config.toml

bolt-path = “/data/influxdb/influxd.bolt”
engine-path = “/data/influxdb/engine”

sudo chown -R influxdb:influxdb /data/influxdb/
Started Influxdb service

I have renamed the influxdb folder to old and created a new one - this allowed me to resetup influx through the UI - this has been done and I have created new buckets etc - but still get the 403 message for the affected hosts.
I can add new hosts plus the original ones but not the affected ones.
I have uninstalled telegraf several times from those servers and reinstalled to no avail.
The following has been run to test the connection:

PS D:\Deploy> Test-NetConnection xxxxxx -port 8086

ComputerName : xxxxxxxxxx
RemoteAddress : xxxxxxxxxx
RemotePort : 8086
InterfaceAlias : Ethernet
SourceAddress : xx.xx.xxx.29
PingSucceeded : True
PingReplyDetails (RTT) : 1 ms
TcpTestSucceeded : True

So we know the connection is ok.

urls = [“http://xxx.xxx.xxx.51:8086”]

Token for authentication.

token = “402fv1wWZzBJdARR9jgbQIQqAd9vtfsn-zm8i6ib4gLn5yIQme2E3Bf0zp1pI_q8oUsai5gKsgfLT_QTzpcgg==”

Organization is the name of the organization you wish to write to; must exist.

organization = “My org”

Destination bucket to write into.

bucket = “telegraf”

The 403 forbidden makes me think that your internal system/OS is trying to restrict “sketchy behaviour” or programs looking at files on your computer (in this instance reading/writing data to a file).

When I was running some of the scripts I was getting errors with regards to Docker needing admin rights to write.

I’d suggest running sudo with telegraf or the influx server but I’m still quite new to working with this stuff.