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

DB does not get populated with stats #12

Open
gunarser opened this issue Feb 22, 2018 · 6 comments
Open

DB does not get populated with stats #12

gunarser opened this issue Feb 22, 2018 · 6 comments

Comments

@gunarser
Copy link

Hi,

We just started testing OpenBMP with the newest stable packages (Kafka, MySQL consumer and UI) but some data does not appear in SNAS GUI. For example, Tops page show only Top20 graphs for Withdraws but Update graphs are empty.
Also, peer information is incorrectly displayed. Half of peers are reported down when in reality they are up.

It seems that data is not parsed correctly and/or populated in database.

How to troubleshoot this issue?

BR,
Gunars

@TimEvens
Copy link
Contributor

TimEvens commented Mar 1, 2018

Hi @gunarser ,

Those are two different sources/handling of data.

  1. the updates over time report in the tops view is driven by the path_attr_log table. This table is updated by a mysql trigger. The trigger checks if there is a path attribute hash change (e.g. change in attribute value from previous) and if so logs it. If no change, it doesn’t log it. You can of course change the trigger to log dups if you want. If, for example, you withdraw then advertise repeatedly, the trigger will only log the withdrawals as changes since the attributes are the same when it is advertised again. If you really want to see every update, even when duplicated, you can update the trigger. Maybe in your case you want to log the flapping. In this case the trigger can be updated to log a new update when the previous is changed from isWithdrawn True to False. When you expect update in tops, are you sure your updates are changes in attributes?

  2. Half the peers being reported down is normally an issue with offsets starting after the peer ups. There is a new config setting in the mysql consumer to set the starting offset as latest or earliest. There was a default config mistake a few weeks back that set this value to latest when it should have been earliest. This has since been fixed. Are you running the latest container/build?

@gunarser
Copy link
Author

gunarser commented Mar 1, 2018 via email

@TimEvens
Copy link
Contributor

Hi @gunarser ,

Those are current, but there is a newer one that adds large community support.

There can be a few reasons why the peer up isn’t making its way to the dB.

  • router isn’t sending peer up. Can you check the openbmpd.log file and make sure you see the peer up and that there are no errors?

  • MySQL consumer is failing to consume or failing to update the dB. Can you check all the mysql-consumer*.log files for any error messages? There should be no errors. Also, by default each consumer will log stats of consumed messages every five minutes. Can you confirm via the stats that at least one of the consumers increments the peer message count? The count should increment for each peer up or down.

Can you also confirm the peer up messages are in Kafka? You can do this using kafkacat -u -b localhost:9092 -t openbmp.parsed.peer -o -100

@gunarser
Copy link
Author

Hi Tim,

In openbmpd.log file I see 'PEER UP Received' messages when the OpenBMP session is re-established. If I understand correctly that is the default behavior when BMP session is brought up on Juniper routers and they send these initial 'PEER UP' messages?
In the same log file I see the following messages:

<...>Ignoring deprecated extended community 128/0<...>
<...>Ignoring deprecated extended community 128/1<...>

Should we worry about them?


The 'peer messages' count increments. Here is the message from yesterday and today for comparison:

2018-03-12 12:09:13 [main] INFO org.openbmp.MySQLConsumerApp - peer messages: 0
2018-03-12 12:14:13 [main] INFO org.openbmp.MySQLConsumerApp - peer messages: 35
<...>
2018-03-13 11:14:14 [main] INFO org.openbmp.MySQLConsumerApp - peer messages: 47
2018-03-13 11:19:14 [main] INFO org.openbmp.MySQLConsumerApp - peer messages: 47


I deactivated and re-activated one peer and this is what I see in Kafka consumer:

$ kafkacat -u -b localhost:9092 -t openbmp.parsed.peer -o -100
% Auto-selecting Consumer mode (use -P or -C to override)
V: 1.7
C_HASH_ID: 1a3e29f5a8c84ea7bc519f159166d4b3
T: peer
L: 224
R: 1

down 19 de26e4d608509af1abca9df8579f8593 8727bdff39320e3166201264086b2af7 example.com 172.16.130.32 2018-03-13 09:30:05.000000 24651 0:0 16 3 Peer de-configured 0 1 1 0 0

V: 1.7
C_HASH_ID: 1a3e29f5a8c84ea7bc519f159166d4b3
T: peer
L: 457
R: 1

up 20 de26e4d608509af1abca9df8579f8593 8727bdff39320e3166201264086b2af7 example.com 172.16.130.32 2018-03-13 09:30:40.000000 24651 0:0 54985 12847 195.246.227.50 179 MPBGP (1) : afi=1 safi=1 : Unicast IPv4, Route Refresh Old (128), Route Refresh (2), Graceful Restart (64), 4 Octet ASN (65), 71 MPBGP (1) : afi=1 safi=1 : Unicast IPv4, Route Refresh Old (128), Route Refresh (2) 180 90

Do the messages look correct?


In gen-active-asns.log file I noticed the following messages:
---- INIT: Creating tables and loading data: 2018-03-13 07:55:03.398611
ERROR: query failed - 1054 (42S22): Unknown column 'isWithdrawn' in 'where clause'
---- DONE: 2018-03-13 07:55:03.417072

Perhaps that's one of the reasons why tables are not populated with stats?

How can we check that DB triggers are working correctly? Perhaps they are another reason why we don't see stats in GUI and DB?

@bofh16
Copy link

bofh16 commented Jan 11, 2021

Hello,
Is this repository still supported? I try to run OpenBMP in all-in-one container and get the same message in gen-active-asns.log. There is clearly a gap, between gen-asn-stats.py script and the database structure. Does the container needs a schema upgrade or the script points in the wrong direction?

@abdul95
Copy link

abdul95 commented Feb 20, 2023

@gunarser I am running to an issue installing while doing a manual install. I am not seeing message counter inclement in the db it is stable at 0.

can you share the steps you took to install ? so I can compare, or if you have any thoughts on how to get passed that issue here are the logs I see in mysql-consumer

2023-02-20 01:49:51 [main] INFO  org.openbmp.MySQLConsumerApp - -- STATS --   thread: 0  read: 0           queue: 0         
2023-02-20 01:49:51 [main] INFO  org.openbmp.MySQLConsumerApp -            collector messages: 0
2023-02-20 01:49:51 [main] INFO  org.openbmp.MySQLConsumerApp -               router messages: 0
2023-02-20 01:49:51 [main] INFO  org.openbmp.MySQLConsumerApp -                 peer messages: 0
2023-02-20 01:49:51 [main] INFO  org.openbmp.MySQLConsumerApp -              reports messages: 0
2023-02-20 01:49:51 [main] INFO  org.openbmp.MySQLConsumerApp -       base attribute messages: 0
2023-02-20 01:49:51 [main] INFO  org.openbmp.MySQLConsumerApp -       unicast prefix messages: 0
2023-02-20 01:49:51 [main] INFO  org.openbmp.MySQLConsumerApp -       l3vpn prefix messages: 0
2023-02-20 01:49:51 [main] INFO  org.openbmp.MySQLConsumerApp -              LS node messages: 0
2023-02-20 01:49:51 [main] INFO  org.openbmp.MySQLConsumerApp -              LS link messages: 0
2023-02-20 01:49:51 [main] INFO  org.openbmp.MySQLConsumerApp -            LS prefix messages: 0

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

No branches or pull requests

4 participants