mikaku / Monitorix

Monitorix is a free, open source, lightweight system monitoring tool.
https://www.monitorix.org
GNU General Public License v2.0
1.12k stars 167 forks source link

wowza shutdown applications are skipped. rrds garbled. #89

Closed bsyd closed 9 years ago

bsyd commented 9 years ago

Sometimes wowza applications can be shut down (unloaded, automatically or manually). When this happens, they disappear from the connectioncounts result. This results in a garbled database, where the numbers are put in the wrong lines.

exemple monitorix.conf :

<wowza>
        list = http://videostream.indostreamserver.com:8086/connectioncounts
        <desc>
                http://videostream.indostreamserver.com:8086/connectioncounts = unknown1, surautv, unknown2, tvmelayu
        </desc>
        rigid = 0, 0, 0, 0, 0
        limit = 100, 100, 100, 100, 100
</wowza>

Result : surautv numbers go in unknown1, and tvmelayu numbers go in surautv.

The correct result should be zero/null/NaN values for unknown1 and unknown2, and the numbers correctly inserted at their [0-7] offset, mapped to the list defined in the configuration.

mikaku commented 9 years ago

I'll be out this weekend, so I'll take a look at it Monday. Thanks.

bsyd commented 9 years ago

Take your time. I understand, I do the same. I have a family.

Sydney.

mikaku commented 9 years ago

Sydney,

The last commit should fix this. Just let me know, thanks.

bsyd commented 9 years ago

No, it still skips unknown1 in the example given above (first argument in the list).

mikaku commented 9 years ago

It works for me now. The non-existent application is now appearing with zero values while the rest is working normally.

bsyd commented 9 years ago

image

does not seem good for me

unknown1 line should be zero-filled. And the numbers sould be one line under.

mikaku commented 9 years ago

Since I'm using an external Wowza server, the only way for me to simulate an Application shutdown is just changing it to a non-existent name, but I'm not sure if that's the best way.

bsyd commented 9 years ago

That's what I do with the config listed in the first post. Please try with that config. It uses your usual external server.

mikaku commented 9 years ago

(I'm now using the same config line, let's run it for a while) I hate asking this but, did you restarted Monitorix after applying the last commit?

mikaku commented 9 years ago

image

Looks good here.

bsyd commented 9 years ago

yes, I restarted, and deleted /var/lib/monitorix/wowza.rrd for good measure. Let's try again. Clean install, kept only config file. image same result... I don't know what's happening.

bsyd commented 9 years ago

I spotted the problem. when I specify only one server, the results are good. image when I specify two servers, the second one is not good.

bsyd commented 9 years ago

if you want to simulate multiple servers with the same server url, simply add a number or other garbage text at the end of /connectioncounts

mikaku commented 9 years ago

Ah thanks!, I was struggling with it :)

mikaku commented 9 years ago

Last commit should fix it.

bsyd commented 9 years ago

I confirm. Closing bug.

bsyd commented 9 years ago

reopening. I now got an error when switching configuration back to one server.

Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/wowza.pm line 661.
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/wowza.pm line 662.
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/wowza.pm line 778.
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/wowza.pm line 779.
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/wowza.pm line 875.
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/wowza.pm line 876.
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/wowza.pm line 967.
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/wowza.pm line 968.
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/wowza.pm line 1059.
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/wowza.pm line 1060.
bsyd commented 9 years ago

closing again. there was a typo in my config.

mikaku commented 9 years ago

OK, thanks anyway.