Graylog2 / Graylog2/graylog2-server

CSV lookup adapter can't process a CSV file

Open
#19,462 0 comments 0 reactions 0 assignees View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

## Expected Behavior
A csv-File stored in a predefined path can be configured as lookup data adapter and return a precconfigured value, e.g.:

CSV-FILE:
![image](https://github.com/Graylog2/graylog2-server/assets/129726628/333e17a5-b8c1-4f7e-a59a-2b58f1c3425b)

TEST:
![image](https://github.com/Graylog2/graylog2-server/assets/129726628/c257896c-d840-4480-92f1-a228dea8a451)

## Current Behavior

For most CSV files the expected behaviour can be achieved. However, there seem to be [exceptions, click for csv file](https://github.com/Graylog2/graylog2-server/files/15456322/windows-applocker-applicationwhitelist.csv); Graylog states that not all lines contain all of the expected columns:

![image](https://github.com/Graylog2/graylog2-server/assets/129726628/2e216cd3-e2a6-4ef3-8f7c-7030f6553837)

![image](https://github.com/Graylog2/graylog2-server/assets/129726628/ed68a35e-c09a-4399-bd4b-8deff2dda34f)

While it's impossible to resolve this by changing format or encoding and whatever one would tend to try of the file, sharing the very same file via http works as expected (used nginx for doing it, using the very same file from a readonly bindmount):

![image](https://github.com/Graylog2/graylog2-server/assets/129726628/4d4a2247-369b-4f26-942c-bc6028f8dbf0)

## Possible Solution

-/-

## Steps to Reproduce (for bugs)

1. Try to create CSV data adapter with the file (see above)
2. Expose the file via http and create a DSV data adapter with the same file

## Context

## Your Environment

* Graylog Version: 6.0.2
* OpenSearch Version: 2.13
* MongoDB Version: 7
* Operating System: Docker Container

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.