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

Process Dispatcher down when BDD is no longer available #6

Closed
chrisho95 opened this issue Nov 16, 2021 · 2 comments
Closed

Process Dispatcher down when BDD is no longer available #6

chrisho95 opened this issue Nov 16, 2021 · 2 comments

Comments

@chrisho95
Copy link

Hello,

I did the following test.

I stop the "Horus" database and I notice the dispatcher process drops when it no longer has access to its database.

We must restart the "dispatcher" process for the "Horus" polling to resume when the database is available again.

Can we tell the dispacter not to stop even if he no longer has access to his base ?

Process start with option:

/data/horus/cmd/bin/horus-dispatcher -l 1 -c postgres://horus:x.x.x.x@x.x.x.x/horus?sslmode=disable -d 3 --log /logs/horus

Logs:

[F] 2021-11-16 08:39:53.083835 db.go:74 - db lock conn ping: driver: bad connection

Br,

Christophe.

@vma
Copy link
Collaborator

vma commented Dec 2, 2021

Hi,

It was done "on purpose" at the time as the db connection is essential for the dispatcher to work. The idea was to let it crash and let systemd (or any other supervisor) restart it in a clean state when db is available again.

It looks like you are using Horus in a very interesting way, I would love to hear more about it :) Feel free to contact me by PM (my email is in my profile.)

@chrisho95
Copy link
Author

Hi,

I handled this feature with "systemd" and it works fine.

We also use the "tags" field of the "devices" table which allows you to add labels. This feature works well but does not expose the labels in the "pingmetrics" metrics. It exposes tags only in the results of the "snmpmetrics" metric.

Examples:

champs "tags": {Communaute="TEST", location="TEST"} for devices "xxxxxxxxxxxxxx"

snmpmetrics:

ifMetrics_ifMtu{Communaute="TEST",category="Network Terminaison Equipment",host="xxxxxxxxxxxxxx",id="1",ifDescr="ETHERNET NETWORK PORT",ifName="NETWORK PORT-1-1-1-2",index="2",location="TEST",model="NTE",oid=".1.3.6.1.2.1.2.2.1.4",vendor="GENERIC"} 9612 1638376611615

pingmetrics: We don't see the tags label "Communaute" and "location".

ping_min_duration_seconds{category="Network Terminaison Equipment",host="xxxxxxxxxxxxxx",id="1",ip_address="yyyyyyyyy",model="NTE",vendor="GENERIC"} 0.01567 1638518891194

Our next challenge will be to create a Horus "docker".

Br,

Chris.

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

2 participants