Skip to content

Commit b1e7953

Browse files
[Fixes #13110] Remove monitoring from GeoNode (#13123)
* [Fixes #13110] Remove monitoring from GeoNode * [Fixes #13110] Remove monitoring from GeoNode * [Fixes #13110] Remove monitoring from GeoNode
1 parent 67096b1 commit b1e7953

File tree

443 files changed

+28
-115030
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

443 files changed

+28
-115030
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ workflows:
160160
# name: tests_geoserver_integration
161161
# load_docker_cache: true
162162
# save_docker_cache: false
163-
# test_suite: 'geonode.geoserver.tests.integration geonode.monitoring.tests.integration'
163+
# test_suite: 'geonode.geoserver.tests.integration'
164164
# requires:
165165
# - geonode_test_suite_smoke
166166

.env.sample

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,6 @@ MAPBOX_ACCESS_TOKEN=
194194
BING_API_KEY=
195195
GOOGLE_API_KEY=
196196

197-
# Monitoring
198-
MONITORING_ENABLED=False
199-
MONITORING_DATA_TTL=365
200-
USER_ANALYTICS_ENABLED=True
201-
USER_ANALYTICS_GZIP=True
202-
CENTRALIZED_DASHBOARD_ENABLED=False
203-
MONITORING_SERVICE_NAME=local-geonode
204-
MONITORING_HOST_NAME=geonode
205197

206198
# Other Options/Contribs
207199
MODIFY_TOPICCATEGORY=True

.env_dev

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,6 @@ MAPBOX_ACCESS_TOKEN=
189189
BING_API_KEY=
190190
GOOGLE_API_KEY=
191191

192-
# Monitoring
193-
MONITORING_ENABLED=False
194-
MONITORING_DATA_TTL=365
195-
USER_ANALYTICS_ENABLED=True
196-
USER_ANALYTICS_GZIP=True
197-
CENTRALIZED_DASHBOARD_ENABLED=False
198-
MONITORING_SERVICE_NAME=local-geonode
199-
MONITORING_HOST_NAME=geonode
200-
201192
# Other Options/Contribs
202193
MODIFY_TOPICCATEGORY=True
203194
AVATAR_GRAVATAR_SSL=True

.env_local

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,6 @@ MAPBOX_ACCESS_TOKEN=
192192
BING_API_KEY=
193193
GOOGLE_API_KEY=
194194

195-
# Monitoring
196-
MONITORING_ENABLED=False
197-
MONITORING_DATA_TTL=365
198-
USER_ANALYTICS_ENABLED=True
199-
USER_ANALYTICS_GZIP=True
200-
CENTRALIZED_DASHBOARD_ENABLED=False
201-
MONITORING_SERVICE_NAME=local-geonode
202-
MONITORING_HOST_NAME=geonode
203-
204195
# Other Options/Contribs
205196
MODIFY_TOPICCATEGORY=True
206197
AVATAR_GRAVATAR_SSL=True

.env_test

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,6 @@ MAPBOX_ACCESS_TOKEN=
201201
BING_API_KEY=
202202
GOOGLE_API_KEY=
203203

204-
# Monitoring
205-
MONITORING_ENABLED=False
206-
MONITORING_DATA_TTL=365
207-
USER_ANALYTICS_ENABLED=True
208-
USER_ANALYTICS_GZIP=True
209-
CENTRALIZED_DASHBOARD_ENABLED=False
210-
MONITORING_SERVICE_NAME=local-geonode
211-
MONITORING_HOST_NAME=geonode
212-
213204
# Other Options/Contribs
214205
MODIFY_TOPICCATEGORY=True
215206
AVATAR_GRAVATAR_SSL=True

Dockerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ LABEL GeoNode development team
55
COPY . /usr/src/geonode/
66
WORKDIR /usr/src/geonode
77

8-
#COPY monitoring-cron /etc/cron.d/monitoring-cron
9-
#RUN chmod 0644 /etc/cron.d/monitoring-cron
10-
#RUN crontab /etc/cron.d/monitoring-cron
11-
#RUN touch /var/log/cron.log
12-
#RUN service cron start
13-
148
COPY wait-for-databases.sh /usr/bin/wait-for-databases
159
RUN chmod +x /usr/bin/wait-for-databases
1610
RUN chmod +x /usr/src/geonode/tasks.py \

entrypoint.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ echo GEODATABASE_URL=$GEODATABASE_URL
3535
echo SITEURL=$SITEURL
3636
echo ALLOWED_HOSTS=$ALLOWED_HOSTS
3737
echo GEOSERVER_PUBLIC_LOCATION=$GEOSERVER_PUBLIC_LOCATION
38-
echo MONITORING_ENABLED=$MONITORING_ENABLED
39-
echo MONITORING_HOST_NAME=$MONITORING_HOST_NAME
40-
echo MONITORING_SERVICE_NAME=$MONITORING_SERVICE_NAME
41-
echo MONITORING_DATA_TTL=$MONITORING_DATA_TTL
4238

4339
# invoke waitfordbs
4440

@@ -54,7 +50,6 @@ else
5450

5551
if [ ${FORCE_REINIT} = "true" ] || [ ${FORCE_REINIT} = "True" ] || [ ! -e "/mnt/volumes/statics/geonode_init.lock" ]; then
5652
invoke fixtures
57-
invoke monitoringfixture
5853
invoke initialized
5954
invoke updateadmin
6055
fi

geonode/base/__init__.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#########################################################################
1919
from functools import wraps
2020

21-
from django.conf import settings
22-
2321

2422
def register_url_event(event_type=None):
2523
"""
@@ -33,9 +31,6 @@ def register_url_event(event_type=None):
3331
def _register_url_event(view):
3432
@wraps(view)
3533
def inner(*args, **kwargs):
36-
if settings.MONITORING_ENABLED:
37-
request = args[0]
38-
register_event(request, event_type or "view", request.path)
3934
return view(*args, **kwargs)
4035

4136
return inner
@@ -55,8 +50,6 @@ def register_event(request, event_type, resource):
5550
>>> def view(request):
5651
register_event(request, 'view', layer)
5752
"""
58-
if not settings.MONITORING_ENABLED:
59-
return
6053

6154
from geonode.base.models import ResourceBase
6255

geonode/base/enumerations.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
#
1818
#########################################################################
19+
import enum
1920

2021
from django.utils.translation import gettext_lazy as _
2122

@@ -499,3 +500,20 @@
499500
)
500501

501502
LAYER_TYPES = ["vector", "raster", "remote", "vector_time"]
503+
504+
505+
class EventType(enum.Enum):
506+
EVENT_DOWNLOAD = "download"
507+
EVENT_CREATE = "create"
508+
EVENT_CHANGE = "change"
509+
EVENT_CHANGE_METADATA = "change_metadata"
510+
EVENT_REMOVE = "remove"
511+
EVENT_VIEW = "view"
512+
EVENT_VIEW_METADATA = "view_metadata"
513+
EVENT_PUBLISH = "publish"
514+
EVENT_UPLOAD = "upload"
515+
EVENT_GEOSERVER = "geoserver" # other event from GS
516+
# special event types
517+
EVENT_OWS = "OWS:ALL" # any ows event
518+
EVENT_OTHER = "other" # non-ows event
519+
EVENT_ALL = "all" # all events - baseline: ows + non-ows

geonode/context_processors.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def resource_urls(request):
7979
LICENSES_METADATA=getattr(settings, "LICENSES", dict()).get("METADATA", "never"),
8080
USE_GEOSERVER=getattr(settings, "USE_GEOSERVER", False),
8181
USE_NOTIFICATIONS=has_notifications,
82-
USE_MONITORING=settings.MONITORING_ENABLED,
8382
DEFAULT_ANONYMOUS_VIEW_PERMISSION=getattr(settings, "DEFAULT_ANONYMOUS_VIEW_PERMISSION", False),
8483
DEFAULT_ANONYMOUS_DOWNLOAD_PERMISSION=getattr(settings, "DEFAULT_ANONYMOUS_DOWNLOAD_PERMISSION", False),
8584
EXIF_ENABLED=getattr(settings, "EXIF_ENABLED", False),

0 commit comments

Comments
 (0)