Help to configure Collectd

Started by Dexter_23, March 27, 2023, 10:50:53 AM

Previous topic - Next topic
Ok so in Grafana what datasource i need to choose??(see screenshoot)

Influx on port 8086.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi i have add the database (see screenshoots), but this server has to be reach external, in portainer as you can see the port exposed to the host is only the 8086, i need to redeploy the container influxdb choose port 2003/tcp instead 8086/tcp?

I run Influx and Grafana here in my home lab on a dedicated server and they are thus reachable via a private IP address. I don't know what portainer is.

You will need both ports. Collectd sends to Influx on port 2003. Grafana reads from Influx on port 8086. If Influx and Grafana are running on the same system that can of course be 127.0.0.1:8086.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi

I've mapping both ports on the host running docker port tcp/8086 and tcp/2003 on influxdb container, on my opnsense firewall in collectd i have configure like the screenshoot you send me, i download a dashboard for opnsense in grafana dashboard website and import the dashboard but i don't receive data from OPNSense Firewall.

UPDATE:
I see one problem after edit the infludb container for mapping port 2003/tcp now the configuration file in /etc/influxdb/influxdb.conf lost the changes for graphite connector.
How to make persistant if i need to edit the container?

March 30, 2023, 11:56:44 AM #21 Last Edit: March 30, 2023, 11:59:02 AM by pmhausen
Sorry, I have no idea. This is container specific and has got nothing to do with Influx or even OPNsense related questions. I run the software on a dedicated server and when I edit configuration files they stay that way.

You should probably ask in some container specific community.

I don't want to be rude, but this is definitely out of scope here.

EDIT: P.S. If you want a one-stop solution to just get some graphs, may I recommend Observium? https://www.observium.org
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Off course is not related to OPNSense, so don't worry :)
This is the actual file /etc/influxdb/influxdb.conf:
[meta]
  dir = "/var/lib/influxdb/meta"

[data]
  dir = "/var/lib/influxdb/data"
  engine = "tsm1"
  wal-dir = "/var/lib/influxdb/wal"

[[graphite]]
  enabled = true
  database = "opnsense"
  retention-policy = ""
  bind-address = ":2003"
  protocol = "tcp"
  consistency-level = "one"

  separator = "."

  templates = [
    "servers.* .hostname.resource.instance.measurement*",
  ]

I attach screenshoot about OPNSense CollectD Configuration and Grafana Dashboard, as you can see i don't receive data from collectd.

Can you use shell commands inside that thing that runs Influx? If yes, please try:

influx
use opnsense;
show series;
Ctrl-D
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi

The command you tell me to use working correcty (see the screenshoot)

Then it's an issue with the data source or the dashboard definition. How did you create the dashboard?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi

I import a dashboard for OPNSense by searching in "https://grafana.com/grafana/dashboards/"
see the screenshoot for details

Anyway if you have a nice dashboard for opnsense can you send me the code for import :)

Thanks

The dashboard configuration depends heavily on the data source and in the case of InfluxDB on the template that is used to dissect the data fed to it into different labels.

If the dashboard you used uses labels different from

- hostname
- resource
- instance

then you will not see anything. These labels are something I configured specifically for my needs graphing TrueNAS performance data. It will work with OPNsense, too, since it's both "just FreeBSD", but the Grafana dashboard will have to match.

There is no "click here" standard to get graphs. All of this is in the responsibility and control of the user. You can come up with any naming scheme you like.

I'll try to come up with something for OPNsense over the weekend.

Kind regards,
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi

I don't know how to configure dashborad to receive data(see screenshoots)

HI @pmhausen

Any good news?

I can't understand how to configure dashboard to receive data...