acouvreur / ssh-log-to-influx

Send SSH authentication logs to influxdb with geohashing IP
GNU General Public License v3.0
101 stars 25 forks source link

Error 400 from Grafana to InfluxDB datasource #158

Closed mtthidoteu closed 3 years ago

mtthidoteu commented 3 years ago

Hey guys! I'm having a bit of a problem with Grafana and InfluxDB. Everything works but I can't get grafana to connect to InfluxDB. It is really weird but I'm getting an Network Error 400.

version: "3.7"

services:
  ssh-log-to-influx:
    image: acouvreur/ssh-log-to-influx:latest
    build: ./
    restart: always
    user: 1000:1000
    environment:
      - INFLUX_HOST=influxdb
      - INFLUX_DB=telegraf
    ports:
      - 7070:7070/tcp
    networks:
      - default

  #----------------------------------------------#
  # InfluxDB : time series database
  #----------------------------------------------#
  influxdb:
    image: influxdb:latest
    user: 1000:1000
    volumes:
      - ./influxdb_data:/var/lib/influxdb
    networks:
      - default

  # Grafana : analytics and monitoring
  #----------------------------------------------#
  grafana:
    image: "grafana/grafana:latest"
    user: 1000:1000
    environment:
      - GF_INSTALL_PLUGINS=grafana-worldmap-panel,grafana-piechart-panel
    volumes:
      - ./grafana_data:/var/lib/grafana
      - ./grafana/provisioning:/etc/grafana/provisioning
      - ./grafana/config.ini:/etc/grafana/config.ini
      - ./grafana/dashboards:/var/lib/grafana/dashboards
    networks:
      - default
      - web

networks:
  default:
  web:
    name: web

Any pointers would be really appreaciated!

acouvreur commented 3 years ago

I just git clone the project and from the root I executed the following command : docker-compose -f docker-compose.standalone.yml up

Everything works as expected and I can see the Influx datasource automatically imported.

Can you provide more details ? Logs .

mtthidoteu commented 3 years ago

I just made the adjustments of adding a web and default network (web so NGINX reverse proxy can connect to it) and setting all the users to 1000. It’s the setup I have for all my other docker-composes and I don’t see why it wouldn’t work.

This is really head scratching

On 24 Mar 2021, at 16:11, Alexis Couvreur @.***> wrote:

 I just git clone the project and from the root I executed the following command : docker-compose -f docker-compose.standalone.yml up

Everything works as expected and I can see the Influx datasource automatically imported.

Can you provide more details ? Logs .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

acouvreur commented 3 years ago

You said:

I'm having a bit of a problem with Grafana and InfluxDB. Everything works but I can't get grafana to connect to InfluxDB. It is really weird but I'm getting an Network Error 400.

Are you using the provided InfluxDB datasource ? Which databse are you trying to add ? I don't understand your issue.

acouvreur commented 3 years ago

Any news @mtthidoteu ?