Server IP : 92.204.138.22 / Your IP : 18.191.26.82 Web Server : Apache System : Linux ns1009439.ip-92-204-138.us 4.18.0-553.8.1.el8_10.x86_64 #1 SMP Tue Jul 2 07:26:33 EDT 2024 x86_64 User : internationaljou ( 1019) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/internationaljou/public_html/admin/js/BROKY_ADMIN/alfasymlink/root/proc/thread-self/root/bin/panopta-agent/ |
Upload File : |
#!/usr/bin/env python import sys from optparse import OptionParser AGG_URL = 'aggregator2.panopta.com:443' VERSION = '2022.47.3' BASE_CONFIG_DIR = '/etc' PKG_DIR = 'panopta-agent' BRAND = 'panopta' if 'freebsd' in sys.platform.lower() or "darwin" in sys.platform.lower(): sys.path.insert(0, '/usr/local/panopta-agent/lib/library') else: sys.path.insert(0, '/usr/lib/panopta-agent/library') sys.path.insert(0, '/usr/lib/panopta-agent/') from maintenance import Maintenance if __name__ == "__main__": parser = OptionParser() parser.add_option('-s', '--start', dest='start', action='store_true', help='Flag to determine if we are going to start a maintenance', default=False) parser.add_option('-e', '--end', dest="end", action="store_true", help="Flag to determine if we are going to end a maintenance", default=False) parser.add_option('-d', '--duration', dest="duration", help="The duration of the maintenance in minutes") parser.add_option('-t', '--metric-tags', dest="metric_tags", help="Optional comma separated list of tags to pass to the maintenance.") options, args = parser.parse_args() start = options.start end = options.end duration = options.duration if not start and not end: print "Please specify an action for the maintenance, --start/--end" sys.exit(1) if start and end: print "Please specific only one of our 2 actions, --start/--end" sys.exit(1) if not duration and not end: print "Please specify a duration for the maintenance." sys.exit(1) metric_tags = options.metric_tags maintenance = Maintenance(BRAND, AGG_URL, VERSION, BASE_CONFIG_DIR, PKG_DIR) if end: maintenance.end() elif start: maintenance.start(duration, metric_tags)