REDROOM
PHP 7.4.33
Path:
Logout
Edit File
Size: 1.72 KB
Close
/home/godevadmin/public_html/upload_images/home/000~ROOT~000/bin/fm-agent/maintenance_noroot.py
Text
Base64
#!/usr/bin/env python import sys from optparse import OptionParser AGG_URL = 'rx.us01.fortimonitor.com' VERSION = '2025.2.14' BASE_CONFIG_DIR = '/etc' PKG_DIR = 'fm-agent' BRAND = 'fm' if 'freebsd' in sys.platform.lower() or "darwin" in sys.platform.lower(): sys.path.insert(0, '/usr/local/fm-agent/lib/library') else: sys.path.insert(0, '/usr/lib/fm-agent/library') sys.path.insert(0, '/usr/lib/fm-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)
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
countermeasure.py
2.99 KB
lrwxr-xr-x
2025-06-18 20:44:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fm_agent.py
3.74 KB
lrwxr-xr-x
2025-06-18 20:44:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fm_agent_noroot.py
1.29 KB
lrw-r--r--
2025-06-18 20:44:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
maintenance.py
1.73 KB
lrwxr-xr-x
2025-06-18 20:44:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
maintenance_noroot.py
1.72 KB
lrwxr-xr-x
2025-06-18 20:44:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
register.py
1.32 KB
lrw-r--r--
2025-06-18 20:44:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
report.py
1.89 KB
lrw-r--r--
2025-06-18 20:44:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
update_config.py
1.52 KB
lrw-r--r--
2025-06-18 20:44:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).