forked from p15670423/monkey
Moved "How do I change the log level of the Monkey Island logger?" as the last section in FAQ of logging
This commit is contained in:
parent
476063ec56
commit
193061b82a
|
@ -17,8 +17,8 @@ Below are some of the most common questions we receive about the Infection Monke
|
||||||
- [Which queries does the Infection Monkey perform to the internet exactly?](#which-queries-does-the-infection-monkey-perform-to-the-internet-exactly)
|
- [Which queries does the Infection Monkey perform to the internet exactly?](#which-queries-does-the-infection-monkey-perform-to-the-internet-exactly)
|
||||||
- [Logging and how to find logs](#logging-and-how-to-find-logs)
|
- [Logging and how to find logs](#logging-and-how-to-find-logs)
|
||||||
- [Monkey Island server](#monkey-island-server)
|
- [Monkey Island server](#monkey-island-server)
|
||||||
- [How do I change the log level of the Monkey Island logger?](#how-do-i-change-the-log-level-of-the-monkey-island-logger)
|
|
||||||
- [Infection Monkey agent](#infection-monkey-agent)
|
- [Infection Monkey agent](#infection-monkey-agent)
|
||||||
|
- [How do I change the log level of the Monkey Island logger?](#how-do-i-change-the-log-level-of-the-monkey-island-logger)
|
||||||
- [Running the Infection Monkey in a production environment](#running-the-infection-monkey-in-a-production-environment)
|
- [Running the Infection Monkey in a production environment](#running-the-infection-monkey-in-a-production-environment)
|
||||||
- [How much of a footprint does the Infection Monkey leave?](#how-much-of-a-footprint-does-the-infection-monkey-leave)
|
- [How much of a footprint does the Infection Monkey leave?](#how-much-of-a-footprint-does-the-infection-monkey-leave)
|
||||||
- [What's the Infection Monkey's impact on system resources usage?](#whats-the-infection-monkeys-impact-on-system-resources-usage)
|
- [What's the Infection Monkey's impact on system resources usage?](#whats-the-infection-monkeys-impact-on-system-resources-usage)
|
||||||
|
@ -109,22 +109,7 @@ The log enables you to see which requests were requested from the server and ext
|
||||||
2019-07-23 10:52:24,027 - report.py:580 - get_domain_issues() - INFO - Domain issues generated for reporting
|
2019-07-23 10:52:24,027 - report.py:580 - get_domain_issues() - INFO - Domain issues generated for reporting
|
||||||
```
|
```
|
||||||
|
|
||||||
#### How do I change the log level of the Monkey Island logger?
|
### Infection Monkey agent logs
|
||||||
|
|
||||||
The log level of the Monkey Island logger is set in the `log_level` field in the `server_config.json` file which is present in your specified data directory. On Linux, the default data directory is `$HOME/.monkey_island`, and on Windows, it is `%AppData%\monkey_island`. Make sure you leave everything else in `server_config.json` unchanged:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"log_level": "DEBUG",
|
|
||||||
"environment": {
|
|
||||||
"server_config": "password",
|
|
||||||
"deployment": "linux"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
To apply the changes, reset the Monkey Island process. Use `sudo systemctl restart monkey-island.service` on Linux, or on Windows, restart the program. Now, any logging in the program will be done according to the new log level.
|
|
||||||
|
|
||||||
### Infection Monkey agent
|
|
||||||
|
|
||||||
The Infection Monkey agent log file can be found in the following paths on machines where it was executed:
|
The Infection Monkey agent log file can be found in the following paths on machines where it was executed:
|
||||||
|
|
||||||
|
@ -147,6 +132,31 @@ The logs contain information about the internals of the Infection Monkey agent's
|
||||||
2019-07-22 19:16:45,013 [77598:140654230214464:DEBUG] connectionpool._make_request.396: https://updates.infectionmonkey.com:443 "GET / HTTP/1.1" 200 61
|
2019-07-22 19:16:45,013 [77598:140654230214464:DEBUG] connectionpool._make_request.396: https://updates.infectionmonkey.com:443 "GET / HTTP/1.1" 200 61
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### How do I change the log level of the Monkey Island logger?
|
||||||
|
|
||||||
|
The log level of the Monkey Island logger is set in the `log_level` field
|
||||||
|
in the `server_config.json` file.
|
||||||
|
On Linux, the default path of `server_config.json` file
|
||||||
|
is `$HOME/.monkey_island/server_config.json`.
|
||||||
|
On Windows, it's `%AppData%\monkey_island\server_config.json`.
|
||||||
|
Make sure to leave everything else in `server_config.json` unchanged:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"log_level": "DEBUG",
|
||||||
|
"environment": {
|
||||||
|
"server_config": "password",
|
||||||
|
"deployment": "linux"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Logging levels correspond to [the logging level constants in python](https://docs.python.org/3.7/library/logging.html#logging-levels).
|
||||||
|
|
||||||
|
To apply the changes, reset the Monkey Island process.
|
||||||
|
On Linux use `sudo systemctl restart monkey-island.service`.
|
||||||
|
On Windows, restart the program.
|
||||||
|
|
||||||
## Running the Infection Monkey in a production environment
|
## Running the Infection Monkey in a production environment
|
||||||
|
|
||||||
### How much of a footprint does the Infection Monkey leave?
|
### How much of a footprint does the Infection Monkey leave?
|
||||||
|
|
Loading…
Reference in New Issue