crholliday / iota-prom-exporter

Iota Exporter for Prometheus Metrics
32 stars 5 forks source link

Auto Remove old Neighbours #4

Closed Donk119 closed 6 years ago

Donk119 commented 6 years ago

Hello its more a feature request as a bug. Is use Nelson to autodiscover neighbours and add them. https://github.com/SemkoDev/nelson.cli

Now i have the problem i have a huge dashboard with lots of "death" neighbours. Is there a possibility to remove them automaticly?

Thanks

crholliday commented 6 years ago

If you refresh the dashboard, it should "clean" out the list if the neighbors are no longer connected and they haven't had activity on the current time scale. I have not used it with Nelson yet myself so I have not verified if this works with the way Nelson provisions and deprovisions peers.

On Wed, Dec 20, 2017 at 6:25 AM, Donk119 notifications@github.com wrote:

Hello its more a feature request as a bug. Is use Nelson to autodiscover neighbours and add them. https://github.com/SemkoDev/nelson.cli

Now i have the problem i have a huge dashboard with lots of "death" neighbours. Is there a possibility to remove them automaticly?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/crholliday/iota-prom-exporter/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/AOgEa-h8fCyzNLu1-1M6ix23JG6KERj0ks5tCPyxgaJpZM4RIUZe .

-- Thanks,

Chris Holliday

Donk119 commented 6 years ago

Hello the Dashboard refreshs every 30 seconds. But it looks like nelson pushes one neighbour and new and new. At the moment i have 92 Neighbours in the Dashboard. :-) The IOTA Peer Manager remove old Neighbours. I dont know :-) You did great work.

crholliday commented 6 years ago

Try to hit the actual refresh button on your browser (F5)

On Wed, Dec 20, 2017 at 7:09 AM, Donk119 notifications@github.com wrote:

Hello the Dashboard refreshs every 30 seconds. But it looks like nelson pushes one neighbour and new and new. At the moment i have 92 Neighbours in the Dashboard. :-) The IOTA Peer Manager remove old Neighbours. I dont know :-) You did great work.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/crholliday/iota-prom-exporter/issues/4#issuecomment-353058903, or mute the thread https://github.com/notifications/unsubscribe-auth/AOgEa-uieiA710XS7x9eH_QYEHZDLe3mks5tCQcRgaJpZM4RIUZe .

-- Thanks,

Chris Holliday

Donk119 commented 6 years ago

Hello this does not work. Sry

Donk119 commented 6 years ago

Or is this a ticket i should place to the Nelson Dev´s

crholliday commented 6 years ago

Does the Total Neighbors measure and Active Neighbors measure show the correct value?

On Wed, Dec 20, 2017 at 7:24 AM, Donk119 notifications@github.com wrote:

Hello this does not work. Sry

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/crholliday/iota-prom-exporter/issues/4#issuecomment-353062051, or mute the thread https://github.com/notifications/unsubscribe-auth/AOgEa_Tyo0cFlmXYcirEzk95FtyVIQErks5tCQqDgaJpZM4RIUZe .

-- Thanks,

Chris Holliday

Donk119 commented 6 years ago

Yes this number is correct.

The Stats by Neighbors blows up all other is ok.

crholliday commented 6 years ago

Ok, on your server, you can do a curl localhost:[portSetForExporter]/metrics and find all the neighbors (toward the bottom). Count them and see if they match up with Total Neighbors value. Those neighbors are what the API command getNeighbors() returns from your IRI.

Donk119 commented 6 years ago

The output shows the right anmount.

crholliday commented 6 years ago

Ok, this seems to be a limitation between Prometheus and Grafana and by design. The neighbors still showing in the details most likely still have reported values within the current timescale selected (1 hour, 3 hours, etc). This makes sense from a reporting standpoint but it makes it difficult from a usability standpoint. If you change the timescale in the top right to 5 minutes then refresh the dashboard (F5), it will cull the neighbor list to only those who have activity in the last 5 minutes. You can then change it back to 1 hour (or your horizon of choice) and it will show currently active neighbors.

Donk119 commented 6 years ago

Ok this is working for me. :-) Thanks

crholliday commented 6 years ago

I am still looking into ways to make this more automatic... especially with the number of neighbors Nelson loads!