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

Cloned in sqlite db information about inactive macs and hosts #8797

Merged
merged 7 commits into from
Nov 5, 2024

Conversation

YellowMan02
Copy link
Contributor

Please sign (check) the below before submitting the Pull Request:

Link to the related issue:
#8794

Describe changes:
I started moving information about inactive macs and hosts from redis to a sqlite database.
The information is now stored in both Redis and the DB. Redis will no longer be used for this task.


-- #################################################################
-- Periodically fetches inactive host information from redis to add
-- it to the slq lite database.
Copy link
Member

Choose a reason for hiding this comment

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

Typo

@@ -0,0 +1,31 @@
--
Copy link
Member

Choose a reason for hiding this comment

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

Rename file to inactive_assets.lua

-- @brief insert assetkey
function asset_management_utils.insert_host(entry)

-- IMPORTANT: keep in sync with check_alert_params function, to be sure to not have issues with empty parameters
Copy link
Member

Choose a reason for hiding this comment

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

Remove


function asset_management_utils.insert_mac(entry)

-- IMPORTANT: keep in sync with check_alert_params function, to be sure to not have issues with empty parameters
Copy link
Member

Choose a reason for hiding this comment

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

Remove

"INSERT INTO %s " ..
"(type, key, mac, first_seen, last_seen) " ..
"VALUES ('%s','%s','%s', %u, %u) "..
"ON CONFLICT(key) DO UPDATE SET last_seen = %u ;",
Copy link
Member

Choose a reason for hiding this comment

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

Add device_type

@lucaderi lucaderi merged commit 3320160 into ntop:dev Nov 5, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

2 participants