icli icon indicating copy to clipboard operation
icli copied to clipboard

Uninitialized value in split

Open jisakiel opened this issue 11 years ago • 4 comments

Regards,

I get these lines on every icli invocation on my system:

Use of uninitialized value in split at /usr/bin/icli line 372, <$_[...]> line 1099.
Use of uninitialized value in split at /usr/bin/icli line 372, <$_[...]> line 1121.
Use of uninitialized value in split at /usr/bin/icli line 372, <$_[...]> line 1126.

My icli is installed in a squeeze + backports amd64 system (accessing an icinga 1.7.1-5~bpo60-1 install). The package is a backport, uupdated to 0.46 from the debian base package (http://packages.debian.org/sid/icli ), without any additional patches.

Besides, acknowledging a service doesn't seem to work (I don't know whether it is related or not). Running icli -h localhost -a "we know" 'RAID' does not make it appear as "acknowledged" in the web interface (but it exits with 0); service name is RAID, of course.

jisakiel avatar Jan 24 '14 10:01 jisakiel

The warnings should be fixed in 08da44369e0b6fa281bbe41afa4ba9f95718c041, they were probably caused by a contact group which does not contain any contacts.

Regarding acknowledgments: Does it say "Acknowledged localhost/RAID: we know"? If so, is the file returned by config_data --module App::Icli --config command_file writable by the user running icli?

derf avatar Jan 25 '14 18:01 derf

I don't get that message when running the command. Icli is running as root (either directly or with sudo) to make sure I can read the status file.

Also, when I run that command I get Can't locate App/Icli/ConfigData.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at (eval 23) line 3.

I have tried bypassing the debian build and directly building from the .tar.gz , in case the debian/rules might be missing something , but it simply installs the man page and the icli binary to /usr/local , resulting in the same error message when calling config_data.

My perl install is the squeeze one, 5.10.1-17squeeze6 . Might this be related to perl versions? Any pointers on how to help you debugging it?

Regarding the warnings, it is more than possible that I get them from empty contact groups, as the icinga config is automatically generated from scripts.

jisakiel avatar Jan 27 '14 09:01 jisakiel

Hm... perl 5.10.0 should be sufficient for that. Does it work when using icli -F /path/to/icinga.cmd ...? (default path for that is /var/lib/icinga/rw/icinga.cmd, but you probably have a different one)

derf avatar Feb 05 '14 19:02 derf

Both icli and `icli -F pathwork (as myicinga.cmdis where you said, in the default path). What doesn't work is theconfig_data``line.

jisakiel avatar Feb 06 '14 08:02 jisakiel