Server IP : 184.154.167.98 / Your IP : 18.191.189.119 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/web-monitoring-tool/ |
Upload File : |
#!/opt/cloudlinux/venv/bin/python3 -bb # coding=utf-8 # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2020 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENCE.TXT import logging import sentry_sdk from clcommon.utils import get_rhn_systemid_value from version import VERSION as PKG_VERSION SENTRY_DNS = 'https://9e8970e72aa44adb892b3f651e2f0860@cl.sentry.cloudlinux.com/33' def setup_logger(logger_name): logging.basicConfig(filename='/var/log/cl_wmt.log', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', datefmt='%Y.%m.%d %I:%M:%S %p') return logging.getLogger(logger_name) def get_package_version(pkg_version=None): """ Strips platform-dependent part of package version. """ pkg_version = pkg_version or PKG_VERSION try: version = pkg_version.split(".el") release = version[0] is_developer = not version[1].endswith('cloudlinux') except IndexError: release = pkg_version is_developer = True return release, is_developer def init_wmt_sentry_client(): version, is_development = get_package_version() sentry_sdk.init(SENTRY_DNS, release=version) sentry_sdk.set_tag('CloudLinux version', get_rhn_systemid_value('os_release')) sentry_sdk.set_tag('Architecture', get_rhn_systemid_value('architecture')) sentry_sdk.environment = 'Development' if is_development else 'Release' sentry_sdk.set_tag('Version', version) sentry_sdk.set_tag('Project', 'web-monitoring-tool') systemid = get_rhn_systemid_value('system_id') or 'unknown' sentry_sdk.set_user({'ID': systemid}) sentry_sdk.set_tag('full_version', PKG_VERSION)