Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File name * (all files) results in No key column "Key_column_name" in row 1 #11

Closed
druchoo opened this issue Oct 5, 2017 · 1 comment

Comments

@druchoo
Copy link

druchoo commented Oct 5, 2017

Choosing File name: * (all files) always results in a No key column "Key_column_name" in row 1 error.

Expected Behavior

All files should correctly be processed

Current Behavior

Error occurs even when there is a 1 valid file in the directory. I've duplicated with CSV and YAML.

image

Possible Solution

Steps to Reproduce (for bugs)

$ cat /etc/icingaweb2/modules/fileshipper/imports.ini
[csv]
basedir = /var/cache/icinga2/import/csv
$ ls -la /var/cache/icinga2/import/csv
total 4
drwxr-sr-x 2 root   icingaweb2 21 Oct  5 15:07 .
drwxr-sr-x 7 icinga icingaweb2 63 Oct  5 14:58 ..
-rw-r--r-- 1 root   icingaweb2 13 Oct  5 15:07 list.csv
$ cat -A /var/cache/icinga2/import/csv/list.csv
host$
my_host$

image

Using the same settings but selecting the single file instead of * (all files) works as expected.

Context

Trying to do an import of multiple files.

Your Environment

  • Module version (System - About): master (f5fff02)
  • Icinga Web 2 version and modules (System - About): 2.4.2 (7cec28a31fdff0feb470ec001838bc1dec9c4b69)
  • Icinga 2 version (icinga2 --version):
icinga2 - The Icinga 2 network monitoring daemon (version: r2.7.1-1)

Copyright (c) 2012-2017 Icinga Development Team (https://www.icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Application information:
  Installation root: /usr
  Sysconf directory: /etc
  Run directory: /run
  Local state directory: /var
  Package data directory: /usr/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /run/icinga2/icinga2.pid

System information:
  Platform: CentOS Linux
  Platform version: 7 (Core)
  Kernel: Linux
  Kernel version: 3.10.0-327.10.1.el7.x86_64
  Architecture: x86_64

Build information:
  Compiler: GNU 4.8.5
  Build host: unknown
  • Webserver, PHP versions:
$ php --version
PHP 5.4.16 (cli) (built: Nov  6 2016 00:29:02)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
$ nginx -V
nginx version: nginx/1.12.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'
$ php-fpm --version
PHP 5.4.16 (fpm-fcgi) (built: Nov  6 2016 00:30:57)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
@Thomas-Gelf
Copy link
Contributor

Please see #4 for an explanation and watch it for an upcoming solution. Currently "all files" expects one object per file and has initially been built for a specific use-case: a bunch of YAML files with Puppet node information, one node per file. I'll close this as it duplicates #4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants