-
Notifications
You must be signed in to change notification settings - Fork 656
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
Conversation
|
||
-- ################################################################# | ||
-- Periodically fetches inactive host information from redis to add | ||
-- it to the slq lite database. |
There was a problem hiding this comment.
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 @@ | |||
-- |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 ;", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add device_type
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.