alerta / alerta-webui

Alerta Web UI 7.0
https://try.alerta.io
Apache License 2.0
109 stars 55 forks source link

Segregate data per customer #569

Open danielelopez1 opened 1 year ago

danielelopez1 commented 1 year ago

Is your feature request related to a problem? Please describe. I noticed that when creating multiple customer on alerta, some information are shared among all of them (i.e. services). this is probably because there is no filter that serves to segregate the information on this criterion.

Describe the solution you'd like Will be cool if there were a filter based on visible customer to segregate informations among different customers.

Describe alternatives you've considered i did not see an alternative, cause the data are queryed on db, so i think the solution can be to make a query, with a where condition which contains the customer names that each user is allowed to view

Additional context Add any other context or screenshots about the feature request here.

satterly commented 1 year ago

I don't understand. The list of services is filtered by customer if a user is assigned to a customer. See https://github.com/alerta/alerta/blob/master/alerta/views/alerts.py#L507

danielelopez1 commented 12 months ago

Uhm.. ok, so maybe it's me who didn't understand how to assign a customer to a user. to do this, i assigned a customer to a group, then added the user to that group. is that the rigth way or there is another way to do it?

image image image

this is my alerta configuration

DATABASE_URL = 'postgresql://alerta:pass@1.2.3.4/alerta' DATABASE_NAME = 'alerta' BASE_URL='/api' ALERT_TIMEOUT= 0 DEFAULT_EXPIRED_DELETE_HRS = 0 DEFAULT_INFO_DELETE_HRS = 0 SHELVE_TIMEOUT=1 HISTORY_LIMIT = 1000 HISTORY_ON_VALUE_CHANGE = False DEFAULT_PAGE_SIZE = 200

PLUGINS = [ "blackout", "reject" ]

NOTIFICATION_BLACKOUT = True BLACKOUT_ACCEPT = ['normal', 'ok', 'cleared'] CUSTOMER_VIEWS = True DEFAULT_FIELD = 'resource'

#########AUTHENTICATION########### AUTH_REQUIRED = True SECRET_KEY = 'somesecret' ADMIN_USERS = ['admin'] ADMIN_ROLES = ['admin'] USER_DEFAULT_SCOPES = ['read:alerts','read:customers'] AUTH_PROVIDER = 'basic' SIGNUP_ENABLED = False GUEST_DEFAULT_SCOPES = ['read:alerts']

####### web UI ######## AUTO_REFRESH_INTERVAL=60000 ALLOWED_ENVIRONMENTS = ['Production', 'Pre-Production', 'Disaster Recovery', 'Development', 'Test', 'UNKNOWN']

COLUMNS = ['severity', 'status', 'createTime', "customer", 'origin', 'environment', 'service', 'resource', 'event', 'text', 'owner'] SITE_LOGO_URL = 'mylogo' DEBUG = False COLOR_MAP = { 'severity': { 'security' : '#0000de', 'critical' : '#e45959', 'major' : '#e97659', 'minor' : '#ffa059', 'warning' : '#ffc859', 'informational' : '#7499ff', 'debug' : '#ac47b7', 'trace' : '#c7c7c7', 'indeterminate' : '#97aab3', 'cleared' : '#59db8f', 'normal' : '#59db8f', 'ok' : '#59db8f', 'unknown' : '#97aab3' } }

LOGGING

AUDIT_TRAIL = ['admin', 'write', 'auth'] AUDIT_LOG = True AUDIT_LOG_JSON = True

LOG_HANDLERS = ['file'] LOG_FILE = '/var/log/alerta/alertad.log' LOG_MAX_BYTES = 1010241024*1024 LOG_BACKUP_COUNT = 1 LOG_FORMAT = 'json' LOG_LEVEL = 'WARNING'