Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

fix: change the way of creating host name which is an id in the database #104

Merged
merged 1 commit into from
Aug 24, 2021

Conversation

omrozowicz-splunk
Copy link
Contributor

This is the fix of following issue.
In the database we store data with host _id of structure -> ip_address:port
For now we save two things to mongo, MIB-REAL-TIME-DATA and MIB-STATIC-DATA. It looks like:
{ "_id" : "127.0.0.1:161", "MIB-REAL-TIME-DATA" : { "1.3.6.1.2.1.1.3.0" : { "value" : "125535155", "type" : "TimeTicks" } }, "MIB-STATIC-DATA" : { "IF-MIB" : [ { "interface_index" : [ "1", "2" ] }, { "interface_desc" : [ "lo", "eth0" ] } ] } }
During first walk operation, firstly host id is being added along with MIB-REAL-TIME-DATA. In case of enricher presence MIB-STATIC-DATA is inserted to the "ip_address:port" structured host id which - we assume - exists.
But in scheduler-inventory.yml host with or without port can be provided. In case user typed bare ip address, in mongo db id was exactly the same:
{ "_id" : "127.0.0.1",
and then in enrichment phase we encountered problem with absent hostname "127.0.0.1:161".

@github-actions
Copy link
Contributor

github-actions bot commented Aug 24, 2021

Expected release notes (by @omrozowicz-splunk)

features:
enrich data with linked tables (#101) (75bdb13)
extract enricher data from config (#97) (123864f)
extract IF-MIB data from an SNMPWALK (#96) (7699591)
support polling the same IP address using multiple profiles (#92) (a6320ca)

fixes:
change the way of creating host name which is an id in the database (0578fb1)
forced commit for creating new release (f3081c1)

others (will not be included in Semantic-Release notes):
fix of duplicated code linter problem (c855088)
fix shellcheck (2fa415a)
apply mypy and flake8 (ec32122)
apply pre-commit isort (9c906f9)
exclude json files from copyright check (f3d6b2d)
update README to include pre-commit (cd6a9eb)
apply pre-commit black (c53b8b6)
pre-commit (9a24536)
33acbbf feat: Replace multiple SNMP walks with one SNMP Bulk (#100)
ebe3ebf Feature/redo walk (#95)
d5879c5 Stubs for lint
9cff184 Stubs for lint
adddbea Stubs for lint
5dc1549 Stubs for lint
2c5a5c3 Feat/multiple profiles2 (#93)

  • I hereby acknowledge these release notes are 🥙 AWESOME 🥙

Copy link
Contributor

@weliasz weliasz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge it when all checks pass.

@weliasz weliasz merged commit bbf2733 into develop Aug 24, 2021
@weliasz weliasz deleted the fix/mongo-add-new-host-id branch August 24, 2021 10:06
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2021
@ryanfaircloth
Copy link
Contributor

🎉 This PR is included in version 1.5.0-develop.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

3 participants