-
Notifications
You must be signed in to change notification settings - Fork 32
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
Perl Script returning errors? #38
Comments
Somehow the script managed to run from Zabbix however, is the log supposed to look like this: $VAR1 = []; Checking Pubnub user panel there seems to be no activity at all?? Seems like something isn't right. |
I managed to debug as much as I could so far and it seems that some needed Perl modules were missing: www/p5-libwww Not sure if the last port was the correct one so did a CPAN install for it: perl -MCPAN -e'install "File::Flock"' At least the /tmp/pubnub.log file is populating with data now :-) However, nothing is being sent to Pubnub. These are the errors observed in the logs: Use of uninitialized value $key in hash element at /usr/local/etc/zabbix22/scripts/pubnub.pl line 34. I think it would be great to include all necessary Perl modules on the Howto Page: http://inovex.github.io/zax/#howto_push Also perhaps a quick guide for Pubnub's web UI as it's anything but user friendly! |
Maybe this should be closed. Works for me and I'm a user is tested this on a plain vanilla Linux centos and aws linux ami and works. Initally some credentials in the naming and ordering could be improved but works for me. |
@jimsmith FreeBSD is a different OS to Linux and built with different library patches etc..... so what works on Linux may not necessarily work on FreeBSD unless correctly patched or hacked out. I think I have got the above to a workable state however, it definitely needs looking at as it's highly unstable. Lot's of Pubnub connection errors. In addition ZAX clients inside the network simply are not able to connect to Pubnub at all and through debugging all I'm getting is "Error" or "Timeout". I'll dig through my logs and see if there's anything substantial to post and report back if I find anything. |
Ok so here is the log from Zabbix server: Use of uninitialized value in concatenation (.) or string at /usr/local/etc/zabbix22/scripts/pubnub.pl line 40. |
I wrote a PHP script to replace it, find it here: https://gist.github.com/aikar/e2b58ca22d1c84537111 No dependencies required other than PHP. |
@aikar You sure the php script works? I get this errors:
|
Oops, I missed a line I had in mine (I made tweaks to it after the original gist and then just pieced in the updates and missed it it seems) above the line 15 Check the gist link for update. |
I have the same errors. Running Ubuntu 14.04 and Zabbix server 3.2:
I have not succeeded in setting up ZAX with PubNub yet. Can anybody help? Is the docs at http://inovex.github.io/zax/#howto_push compatible with Zabbix 3? Is some update like for Zabbkit at https://www.zabbix.com/forum/showthread.php?t=41967&page=8 needed? |
It seems the errors above don't matter as my ZAX perl script suddently started working correctly. The solution was to add the parameters described at https://www.zabbix.com/documentation/3.0/manual/introduction/whatsnew300#custom_parameter_support_for_alert_scripts and then waiting for some 30 minutes or so. Looking at my admin.pubnub.com account the app I created (and used the public and private keys from) says there are no devices and no messages have been relayed, but still it works. |
Hi,
I'm trying to run the perl script on FreeBSD 10 but it keeps on throwing up errors:
Use of uninitialized value in split at /usr/local/etc/zabbix22/scripts/pubnub.pl line 27.
Use of uninitialized value $ARGV[1] in concatenation (.) or string at /usr/local/etc/zabbix22/scripts/pubnub.pl line 40.
Use of uninitialized value in concatenation (.) or string at /usr/local/etc/zabbix22/scripts/pubnub.pl line 40.
Use of uninitialized value in concatenation (.) or string at /usr/local/etc/zabbix22/scripts/pubnub.pl line 40.
Use of uninitialized value in print at /usr/local/etc/zabbix22/scripts/pubnub.pl line 44.
Perl version is: 5.16.3_11
I also have all the necessary Perl packages installed and have been following this guide:
http://inovex.github.io/zax/#howto_push
Though my Zabbix version is 2.2 but that shouldn't matter..... I think.
Can anyone help?
Thanks
The text was updated successfully, but these errors were encountered: