zbx-sadman / zabbuino

Zabbix agent for Arduino
92 stars 14 forks source link

Zabbuino not responding correctly to zabbix after while #3

Closed Hy3n4 closed 7 years ago

Hy3n4 commented 8 years ago

Hi, I am getting strange behaviour from Zabbuino. It seems to not responding correctly to Zabbix after some time (it is different each time). Zabbix item gives me this:

Received value [30??zabbuin16.cdisZB4850ZBX_NOTSUPPORTED913913?1827.00?00?IZBZBX_NOTSUPZBX_NOTSUPPORTEDis.cz048ZBX_NOTSUPP0X_NOT1PORTED0è180893r?3381381??e151?103100904850?rr??8m.?438933811255NOTSU237ED049048500??N101??;I??(?M?410981s.솻1010ZBX_NOTSUPPORTED0004Za0i01.0.0381?1?q{???1011Vig01017738143810038149101.1893z?\?01?8690851???4850tT?1ZBX_NOTSU4913D_NOTSUPPORTED640?ZBX_NOTSUPPORTED?2493114815349350189310?1381Ә?4913????749412114850?2ZBX_NOTSUPPORTED01036ZZBX_NOTSUPPORTED5403ZB26.5UPPORTED] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]

Not sure what it means, but from time to time during the day it becomes online and then after while some items gets NOT_SUPPORTED again.

But it seems to responding well when triggering zabbix_get command manualy.

I thought it may be caused by check frequency set too low, but it is the same when i set 5m or 30s.

After reboot Zabbuino performs well for some time. But it is not always the same period of time.

Attaching screenshot of graph just for illustration of its behaviour. screen shot 2016-07-12 at 09 59 50

zbx-sadman commented 8 years ago

Interesting. Do you use 1.0.0-prerelase or 0.9999?

Looks like 0.9999 :) Its nave very ugly code for network processing. It caused charts gaps very often.

In 1.0.0-prerelase all was reworked and seems to be stable (no problem with 3 DS with standart power and 3 DS with parasite power + BMP180 + tilt switch + other measures) for 5 days on my prototype board.

The reply output a similar to stack overflow error. I fix the piece of code in 1.0.0-prerelase that suspect to overflow on last week...

So, you can look to chart of sys.ram.freemin (with _GATHER_METRIC_USING_TIMERINTERRUPT enabled) to see how much free memory remains to MCU. Its going down within one-two hours and must be stabilizes then.

I have ~190 bytes for sys.ram.freemin with ATMEGA Nano+ENC28J60 prototype and haven't gaps or stack error...

Hy3n4 commented 8 years ago

Right now I am using 1.0.0-prerelease. But powering my UNO over USB port so maybe this should be an issue.

Average sys.ram.freemin is around 898 bytes with GATHER_METRIC_USING_TIMER_INTERRUPT enabled so it should work flawlessly.

zbx-sadman commented 8 years ago

I do not think that the case USB power. But u can see charts for sys.vcc & sys.vccmin to be sure that power is good or poor.

I see that u have Ethernet Shield (so many free ram), right? W5100 chip?

Which sensors you use - only DS's?

And try to get latest code from git and reflash UNO. I still rewriting code to optimal. But i need to stops implementing new sensors and new bugs.

Hy3n4 commented 8 years ago

sys.vccmin is ~4.88V and sys.vcc is ~4.91V and seems pretty stable.

Yes I am using W5100 chip and Aruino UNO with ATMega328.

Right now I have connected one DS and one photo resistor to A0 pin. But DS is connected only for last 2 days but it behaved just as well as before.

Just flashed latest code will see if there will be a difference.

zbx-sadman commented 8 years ago

Yes, very solid config: one DS, W5100, good power, many free ram. Have no idea to bug place at presently...

Let me know about latest code stability. I have all to simiulate the same for testing: Duemilanove, DS and photo resistor.

Hy3n4 commented 8 years ago

There is a Serial Debug Output if you are interested.

Execute command #FFFFFFFF =>dds18x20.temperature arg[0] => "7" => 7, offset =21 arg[1] => "9" => 9, offset =23 arg[2] => "0x28d1a0d40100007a" => 4294967295, offset =25 arg[3] => "" => 0, offset =43 arg[4] => "" => 0, offset =43 arg[5] => "" => 0, offset =43 Result: ZBX_NOTSUPPORTED

Problem still persists with latest version of code. Will try with external power source, but I can't find suitable power supply right now.

zbx-sadman commented 8 years ago

Hm.. why dds18x20?

Hy3n4 commented 8 years ago

And thats wha I am wondering too.. another debug says:

Execute command #FFFFFFFF =>�digitalread arg[0] => "8" => 8, offset =13 arg[1] => "" => 0, offset =14 arg[2] => "" => 0, offset =14 arg[3] => "" => 0, offset =14 arg[4] => "" => 0, offset =14 arg[5] => "" => 0, offset =14 Result: ZBX_NOTSUPPORTED

That question mark does not belong there.. Oh I forgot to mention that I am using Zabbix 3.0.

zbx-sadman commented 8 years ago

Ough, i do tests with Zabbix v2.4. But you write that zabbix_get command is work properly. What its version - 2.x or 3.x?

Hy3n4 commented 8 years ago

zabbix_get is 3.x version

will try to install Zabbix Server 2.4 and test it

zbx-sadman commented 8 years ago

Unfortunatly i haven't Zabbix 3 server installed, but i try to check compatibility.

Or you can contact to me via email and i send to u part of zabbuino.ino with detailed debug messaging.

Hy3n4 commented 8 years ago

I have just send you an email. I can try detailed debugging.

Hy3n4 commented 7 years ago

For anyone who will hit this thread in the future. Resolution for this issue was to change MAC address. I previously used version 0.99999 with the same MAC and probably that was the issue with combination with our network switch.