Switched to SQLlite database
This commit is contained in:
0
CONSTRAINTS.md
Normal file → Executable file
0
CONSTRAINTS.md
Normal file → Executable file
0
PROGRESS.md
Normal file → Executable file
0
PROGRESS.md
Normal file → Executable file
26
SPEC.md
Normal file → Executable file
26
SPEC.md
Normal file → Executable file
@@ -108,3 +108,29 @@ The project will be composed of the following files:
|
||||
|
||||
## 7. Testing and Debugging
|
||||
The script is equipped with a test mode, that only runs the script once, and not continuously. To enable, change the `TEST_MODE` variable in `config.py` to `True`. Once finished testing, change the variable back to `False`.
|
||||
|
||||
## 8. Future Enhancements
|
||||
|
||||
### 8.1. Process Monitoring
|
||||
|
||||
**Description:** The agent will be able to monitor a list of critical processes to ensure they are running. If a process is not running, an anomaly will be generated.
|
||||
|
||||
**Implementation Plan:**
|
||||
|
||||
1. **Configuration:** Add a new list variable to `config.py` named `PROCESSES_TO_MONITOR` which will contain the names of the processes to be monitored.
|
||||
2. **Data Ingestion:** Create a new function in `monitor_agent.py` called `get_running_processes()` that uses the `psutil` library to get a list of all running processes.
|
||||
3. **Data Analysis:** In `analyze_data_locally()`, compare the list of running processes with the `PROCESSES_TO_MONITOR` list from the configuration. If a process from the configured list is not found in the running processes, generate a "high" severity anomaly.
|
||||
4. **LLM Integration:** The existing `generate_llm_report()` function will be used to generate a report for the new anomaly type.
|
||||
5. **Alerting:** The existing alerting system will be used to send alerts for the new anomaly type.
|
||||
|
||||
### 8.2. Docker Container Monitoring
|
||||
|
||||
**Description:** The agent will be able to monitor a list of critical Docker containers to ensure they are running and healthy. If a container is not running or is in an unhealthy state, an anomaly will be generated.
|
||||
|
||||
**Implementation Plan:**
|
||||
|
||||
1. **Configuration:** Add a new list variable to `config.py` named `DOCKER_CONTAINERS_TO_MONITOR` which will contain the names of the Docker containers to be monitored.
|
||||
2. **Data Ingestion:** Create a new function in `monitor_agent.py` called `get_docker_container_status()` that uses the `docker` Python library to get the status of all running containers.
|
||||
3. **Data Analysis:** In `analyze_data_locally()`, iterate through the `DOCKER_CONTAINERS_TO_MONITOR` list. For each container, check its status. If a container is not running or its status is not "running", generate a "high" severity anomaly.
|
||||
4. **LLM Integration:** The existing `generate_llm_report()` function will be used to generate a report for the new anomaly type.
|
||||
5. **Alerting:** The existing alerting system will be used to send alerts for the new anomaly type.
|
||||
1
requirements.txt
Normal file → Executable file
1
requirements.txt
Normal file → Executable file
@@ -5,3 +5,4 @@ ollama
|
||||
syslog-rfc5424-parser
|
||||
python-nmap
|
||||
schedule
|
||||
docker
|
||||
|
||||
Reference in New Issue
Block a user