Skip to content

Commit 3c8790c

Browse files
committed
fix: update Dockerfile and requirements, enhance logging, and improve monitoring service
Signed-off-by: kang2453 <kang2453@gmail.com>
1 parent 7f57fec commit 3c8790c

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ RUN apt update && apt upgrade -y
1010

1111
COPY pkg/*.txt ${PKG_DIR}/
1212
RUN pip install --upgrade pip && \
13-
pip install --upgrade --use-deprecated=legacy-resolver -r ${PKG_DIR}/pip_requirements.txt && \
14-
pip install --upgrade spaceone-api
13+
pip install --upgrade --use-deprecated=legacy-resolver -r ${PKG_DIR}/pip_requirements.txt
1514

1615
COPY src ${SRC_DIR}
1716

pkg/pip_requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
google-api-python-client
2-
schematics
2+
schematics
3+
spaceone-api>=1.0.0,<2.0.0
4+
spaceone-core>=1.0.0,<2.0.0

src/cloudforet/monitoring/conf/global_conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
'filters': {
66
'masking': {
77
'rules': {
8+
'DataSource.verify': [
9+
'secret_data'
10+
],
811
'Log.list': [
912
'secret_data'
13+
],
14+
'Log.list_logs':[
15+
'secret_data'
1016
]
1117
}
1218
}

src/cloudforet/monitoring/connector/cloud_logging_connector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def list_log_entries(self, params):
2323
'pageSize': 10000
2424
}
2525

26-
_LOGGER.debug(f'Cloud Logging Filter: {body["filter"]}')
26+
_LOGGER.info(f'Cloud Logging Filter: {body["filter"]}')
2727

2828
request = self.client.entries().list(body=body)
2929

src/cloudforet/monitoring/manager/monitoring_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ def list_logs(self, params):
3030
except Exception as e:
3131
raise ERROR_CONVERT_EVENT(event=log, error=e)
3232

33+
if not event_vos:
34+
continue
3335
yield Log({'results': event_vos})

src/cloudforet/monitoring/service/monitoring_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77

88
@authentication_handler
9+
@authorization_handler
10+
@event_handler
911
class MonitoringService(BaseService):
1012
def __init__(self, metadata):
1113
super().__init__(metadata)

0 commit comments

Comments
 (0)