Skip to content

Syslog plugin #36

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

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open

Syslog plugin #36

wants to merge 4 commits into from

Conversation

alexandraBara
Copy link
Collaborator

Collecting system logs from /var/log/syslog*. Collection only, this plugin does not have an analyzer part yet.
Sample run:

(venv) (base) alexbara@pp-128-a5-1:~/node-scraper$ node-scraper run-plugins SyslogPlugin
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Log path: ./scraper_logs_pp_128_a5_1_2025_08_18-02_07_26_PM
  2025-08-18 14:07:26 CDT       INFO               nodescraper | System Name: <>
  2025-08-18 14:07:26 CDT       INFO               nodescraper | System SKU: None
  2025-08-18 14:07:26 CDT       INFO               nodescraper | System Platform: None
  2025-08-18 14:07:26 CDT       INFO               nodescraper | System location: SystemLocation.LOCAL
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Initializing connection manager for InBandConnectionManager with default args
  2025-08-18 14:07:26 CDT       INFO               nodescraper | --------------------------------------------------
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Running plugin SyslogPlugin
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Initializing connection: InBandConnectionManager
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Using local shell
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Checking OS family
  2025-08-18 14:07:26 CDT       INFO               nodescraper | OS Family: LINUX
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Running data collector: SyslogCollector
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Collected syslog log: rotated_syslog.log
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Collected syslog log: rotated_syslog.1.log
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Collected syslog log: rotated_syslog.2.gz.log
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Collected syslog log: rotated_syslog.3.gz.log
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Collected syslog log: rotated_syslog.4.gz.log
  2025-08-18 14:07:26 CDT       INFO               nodescraper | (SyslogPlugin) Syslog data collected
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Closing connections
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Running result collators
  2025-08-18 14:07:26 CDT       INFO               nodescraper | Running TableSummary result collator
  2025-08-18 14:07:26 CDT       INFO               nodescraper |

+-------------------------+--------+-----------------------------+
|  Connection              | Status | Message                     |
+-------------------------+--------+-----------------------------+
|  InBandConnectionManager | UNSET  | task completed successfully |
+-------------------------+--------+-----------------------------+

+--------------+--------+-------------------------------------+
|  Plugin       | Status | Message                             |
+--------------+--------+-------------------------------------+
|  SyslogPlugin | OK     | Plugin tasks completed successfully |
+--------------+--------+-------------------------------------+

  2025-08-18 14:07:26 CDT       INFO               nodescraper | Data written to csv file: ./scraper_logs_pp_128_a5_1_2025_08_18-02_07_26_PM/nodescraper.csv

class SyslogData(DataModel):
"""Data model for in band syslog logs"""

syslog_logs: int = 0
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@landrews-amd should i be keeping track of the files collected rather than the number of logs collected? (similar to the dmesg PR?)

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.

1 participant