def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument( '-n', '--name', metavar='meter_name', dest='meter', action='store', required=True, help='Name of the meter to get output information') self.parser.add_argument('-s', '--since', metavar='since', dest='since', action='store', required=False, default=1, help='Pull since items from end of log') self.parser.add_argument('-r', '--raw', dest='raw', action='store_true', required=False, help='Send output in raw JSON format')
def add_arguments(self): """ Add specific command line arguments for this command """ # Call our parent to add the default arguments ApiCli.add_arguments(self) # Command specific arguments self.parser.add_argument('-f', '--format', dest='format', action='store', required=False, choices=['csv', 'json', 'raw', 'xml'], help='Output format. Default is raw') self.parser.add_argument('-n', '--name', dest='metric_name', action='store', required=True, metavar="metric_name", help='Metric identifier') self.parser.add_argument('-g', '--aggregate', dest='aggregate', action='store', required=False, choices=['sum', 'avg', 'max', 'min'], help='Metric default aggregate') self.parser.add_argument('-r', '--sample', dest='sample', action='store', type=int, metavar="sample", help='Down sample rate sample in seconds') self.parser.add_argument('-s', '--source', dest='source', action='store', metavar="source", required=True, help='Source of measurement') self.parser.add_argument('-b', '--start', dest='start', action='store', required=True, metavar="start", help='Start of time range as ISO 8601 string or epoch seconds') self.parser.add_argument('-d', '--end', dest='end', action='store', metavar="end", required=False, help='End of time range as ISO 8601 string or epoch seconds') self.parser.add_argument('-o', '--date-format', dest='date_format', action='store', metavar="format", required=False, help='For CSV, JSON, and XML output formats dates (see Python date.strftime). ' + 'Default format is %%s')
def add_arguments(self): """ """ ApiCli.add_arguments(self) self.parser.add_argument('-i', '--alarm-id', dest='alarm_id', action='store', required=True, metavar='alarm-id', help='Alarm identifier')
def add_arguments(self): """ """ ApiCli.add_arguments(self) self.parser.add_argument('-f', '--file', metavar='path', dest='file', action='store', required=True, help='Name of the meter to get plugin configuration information')
def add_arguments(self): """ """ ApiCli.add_arguments(self) self.parser.add_argument('-n', '--alarm-name', dest='alarm_name', action='store', required=True, metavar='alarm-name', help='Alarm name')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-n', '--plugin-name', dest='pluginName', action='store', required=True, metavar="plugin_name", help='Plugin name')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-s', '--sources', dest='sources', metavar='source1[,source2]', action='store', required=True, help='List of sources to delete')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-n', '--metric-name', dest='metric_name', action='store', required=True, metavar='metric_name', help='Metric identifier')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('--no-control', dest="control", action='store_true', required=False, help='Remove control field from the output') self.parser.add_argument('--no-metrics', dest="metrics", action='store_true', required=False, help='Remove metric field from the output') self.parser.add_argument('--no-plugins', dest="plugins", action='store_true', required=False, help='Remove plugins field from the output')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-d', '--disable', dest='disabled', action='store', default=None, choices=['yes', 'no'], help='Enable or disable the meter') self.parser.add_argument('-n', '--name', metavar='name', dest='name', action='store', required=True, help='Name of the meter to toggle') self.parser.add_argument('-r', '--remove', dest='remove', action='store', default=None, choices=['yes', 'no'], help='Remove the meter')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-i', '--event-id', dest='event_id', action='store', required=True, metavar='event_id', help='Event id of the event to fetch')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-n', '--name', metavar='meter_name', dest='meter', action='store', required=True, help='Name of the meter to get output information') self.parser.add_argument('-s', '--since', metavar='since', dest='since', action='store', required=False, default=1, help='Pull since items from end of log') self.parser.add_argument('-r', '--raw', dest='raw', action='store_true', required=False, help='Send output in raw JSON format')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument( '-f', '--file-name', dest='file_name', action='store', required=False, metavar='path', help='File name including path of data to plot')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument( '-f', '--file', dest='file_path', action='store', required=False, metavar='path', help='Path to plugin.json manifest. Defaults to plugin.json')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-m', '--metric', dest='metric', action='store', required=True, metavar='metric_name', help='Name of the metric to alarm') self.parser.add_argument('-g', '--trigger-aggregate', dest='aggregate', action='store', required=(False if self._update else True), choices=['sum', 'avg', 'max', 'min'], help='Metric aggregate to alarm upon') self.parser.add_argument('-o', '--trigger-operation', dest='operation', action='store', required=(False if self._update else True), choices=['eq', 'gt', 'lt'], help='Trigger threshold comparison') self.parser.add_argument('-v', '--trigger-threshold', dest='threshold', action='store', required=(False if self._update else True), metavar='value', help='Trigger threshold value') self.parser.add_argument('-r', '--trigger-interval', dest='trigger_interval', action='store', metavar='trigger_interval', required=False, type=int, help='Interval of time in ms that the alarm state should be in fault ' + 'before triggering') self.parser.add_argument('-j', '--timeout-interval', dest='timeout_interval', action='store', metavar = 'timeout_interval', required=False, type=int, help='The interval after which an individual host state should resolve by timeout. ' + 'Default: 259200000 milli-seconds (3 days)') self.parser.add_argument('-u', '--host-group-id', dest='host_group_id', action='store', metavar='host_group_id', type=int, help='Host group the alarm applies to') self.parser.add_argument('-d', '--note', dest='note', action='store', metavar='note', help='A description or resolution of the alarm') self.parser.add_argument('-k', '--action', dest='actions', action='append', metavar='action-id', type=int, help='An action to be performed when an alarm is triggered') self.parser.add_argument('-c', '--notify-clear', dest='notify_clear', action='store', default=None, choices=['true', 'false'], help='Perform actions when all hosts') self.parser.add_argument('-s', '--notify-set', dest='notify_set', action='store', default=None, choices=['true', 'false'], help='Perform actions when an alarm threshold and interval is breached.') self.parser.add_argument('-p', '--per-host-notify', dest='per_host_notify', action='store', default=None, choices=['true', 'false'], help='An alarm by default will run the associated actions when \ any server in the host group violates the threshold, and then at the end when \ all servers are back within the threshold. If perHostNotify is set to true, \ the actions will run when ANY server in the group violates \ and falls back within the threshold.') self.parser.add_argument('-x', '--is-disabled', dest='is_disabled', action='store', default=None, choices=['true', 'false'], help='Enable or disable the alarm definition')
def add_arguments(self): """ """ ApiCli.add_arguments(self) self.parser.add_argument('-i', '--host-group-id', dest='hostGroupId', action='store', required=True, metavar="host_group_id", help='Host group id')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument( '-b', '--status', dest='status', action='store', choices=['acknowledged', 'closed', 'ok', 'open']) self.parser.add_argument('-r', '--severity', dest='severity', action='store', choices=['info', 'warn', 'error', 'critical'], help='Severity of the the event') self.parser.add_argument('-m', '--message', dest='message', action='store', metavar='message', help='Text describing the event') self.parser.add_argument( '-f', '--fingerprint-fields', dest='fingerprint_fields', action='store', required=True, type=split_string, metavar='field_list', help='List of fields that make up the fingerprint') self.parser.add_argument('-o', '--tenant-id', dest='tenant_id', action='store', metavar='tenant_id', help='Tenant Id') # Use the mixin to add argument to handle properties self._add_property_argument(self.parser, 'Add properties to an event') self.parser.add_argument( '-s', '--source', dest='source', action='store', metavar='ref:type:name:properties', type=split_string, help='A description or resolution of the alarm') self.parser.add_argument('-w', '--title', dest='title', metavar='title', action='store', required=True, help='Title of the event')
def add_arguments(self): """ """ ApiCli.add_arguments(self) self.parser.add_argument( '-f', '--file', metavar='path', dest='file', action='store', required=True, help='Name of the meter to get plugin configuration information')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-n', '--metric-name', dest='metricName', action='store', required=True, metavar='metric_name', help='Metric identifier') self.parser.add_argument('-m', '--measurement', dest='measurement', action='store', required=True, metavar="measurement", help='Measurement value') self.parser.add_argument('-s', '--source', dest='source', action='store', required=False, metavar="source", help='Source of measurement. Defaults to the host where the command is run') self.parser.add_argument('-d', '--timestamp', dest='timestamp', action='store', metavar="timestamp", help='Time of occurrence of the measurement in either epoch seconds or \ epoch milliseconds. Defaults to the receipt time at api endpoint') self.parser.add_argument('-p', '--property', dest='properties', action='append', required=False, metavar='property=value', help='Property to add to the measurement')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-i', '--host-group-id', dest='hostGroupId', metavar='host_group_id', action='store', required=True, help='Host group id to delete') self.parser.add_argument( '-f', '--force', dest='force', action='store_true', help='Remove the host group, even if in use by a dashboard or alarm' )
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument( '-m', '--metric-manifest-path', dest='metric_manifest_path', action='store', required=False, metavar='path', default=None, help='Path to metrics.json manifest. Defaults to metrics.json') self.parser.add_argument( '-p', '--plugin-manifest-path', dest='plugin_manifest_path', action='store', required=False, metavar='path', default=None, help='Path to plugin.json manifest. Defaults to plugin.json') self.parser.add_argument( '-o', '--readme-path', dest='readme_path', action='store', required=False, metavar='path', default=None, help='Path to README.md manifest. Defaults to standard out') self.parser.add_argument( '-r', '--readme-template-path', dest='readme_template_path', action='store', required=False, metavar='path', default=None, help='Path to README.md template. Defaults to internal template')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-b', '--status', dest='status', action='store', choices=['acknowledged', 'closed', 'ok', 'open']) self.parser.add_argument('-r', '--severity', dest='severity', action='store', choices=['info', 'warn', 'error', 'critical'], help='Severity of the the event') self.parser.add_argument('-m', '--message', dest='message', action='store', metavar='message', help='Text describing the event') self.parser.add_argument('-f', '--fingerprint-fields', dest='fingerprint_fields', action='store', required=True, type=split_string, metavar='field_list', help='List of fields that make up the fingerprint') self.parser.add_argument('-o', '--tenant-id', dest='tenant_id', action='store', metavar='tenant_id', help='Tenant Id') # Use the mixin to add argument to handle properties self._add_property_argument(self.parser, 'Add properties to an event') self.parser.add_argument('-s', '--source', dest='source', action='store', metavar='ref:type:name:properties', type=split_string, help='A description or resolution of the alarm') self.parser.add_argument('-w', '--title', dest='title', metavar='title', action='store', required=True, help='Title of the event')
def add_arguments(self): """ """ ApiCli.add_arguments(self) self.parser.add_argument( '-n', '--name', metavar='meter_name', dest='meter', action='store', required=True, help='Name of the meter to set plugin configuration information') self.parser.add_argument( '-s', '--since', metavar='timestamp', dest='since', action='store', required=False, help='Unix timestamp of when configuration was last checked. ' + 'If configuration has not changed, null is returned.')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-n', '--host-group-name', dest='hostGroupName', metavar="host_group_name", action='store', required=True,help='Host group name')
def add_arguments(self): ApiCli.add_arguments(self)
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-n', '--plugin-Name', dest='pluginName', action='store', metavar='plugin_name', required=True, help='Plugin name')
def add_arguments(self): """ Add specific command line arguments for this command """ # Call our parent to add the default arguments ApiCli.add_arguments(self) # Command specific arguments self.parser.add_argument('-f', '--format', dest='format', action='store', required=False, choices=['csv', 'json', 'raw', 'xml'], help='Output format. Default is raw') self.parser.add_argument('-n', '--name', dest='metric_name', action='store', required=True, metavar="metric_name", help='Metric identifier') self.parser.add_argument('-g', '--aggregate', dest='aggregate', action='store', required=False, choices=['sum', 'avg', 'max', 'min'], help='Metric default aggregate') self.parser.add_argument('-r', '--sample', dest='sample', action='store', type=int, metavar="sample", help='Down sample rate sample in seconds') self.parser.add_argument('-s', '--source', dest='source', action='store', metavar="source", required=True, help='Source of measurement') self.parser.add_argument( '-b', '--start', dest='start', action='store', required=True, metavar="start", help='Start of time range as ISO 8601 string or epoch seconds') self.parser.add_argument( '-d', '--end', dest='end', action='store', metavar="end", required=False, help='End of time range as ISO 8601 string or epoch seconds') self.parser.add_argument( '-o', '--date-format', dest='date_format', action='store', metavar="format", required=False, help= 'For CSV, JSON, and XML output formats dates (see Python date.strftime). ' + 'Default format is %%s')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-m', '--metric', dest='metric', action='store', required=True, metavar='metric_name', help='Name of the metric to alarm') self.parser.add_argument('-g', '--trigger-aggregate', dest='aggregate', action='store', required=(False if self._update else True), choices=['sum', 'avg', 'max', 'min'], help='Metric aggregate to alarm upon') self.parser.add_argument('-o', '--trigger-operation', dest='operation', action='store', required=(False if self._update else True), choices=['eq', 'gt', 'lt'], help='Trigger threshold comparison') self.parser.add_argument('-v', '--trigger-threshold', dest='threshold', action='store', required=(False if self._update else True), metavar='value', help='Trigger threshold value') self.parser.add_argument( '-r', '--trigger-interval', dest='trigger_interval', action='store', metavar='trigger_interval', required=False, type=int, help= 'Interval of time in ms that the alarm state should be in fault ' + 'before triggering') self.parser.add_argument( '-j', '--timeout-interval', dest='timeout_interval', action='store', metavar='timeout_interval', required=False, type=int, help= 'The interval after which an individual host state should resolve by timeout. ' + 'Default: 259200000 milli-seconds (3 days)') self.parser.add_argument('-u', '--host-group-id', dest='host_group_id', action='store', metavar='host_group_id', type=int, help='Host group the alarm applies to') self.parser.add_argument( '-d', '--note', dest='note', action='store', metavar='note', help='A description or resolution of the alarm') self.parser.add_argument( '-k', '--action', dest='actions', action='append', metavar='action-id', type=int, help='An action to be performed when an alarm is triggered') self.parser.add_argument('-c', '--notify-clear', dest='notify_clear', action='store', default=None, choices=['true', 'false'], help='Perform actions when all hosts') self.parser.add_argument( '-s', '--notify-set', dest='notify_set', action='store', default=None, choices=['true', 'false'], help= 'Perform actions when an alarm threshold and interval is breached.' ) self.parser.add_argument( '-p', '--per-host-notify', dest='per_host_notify', action='store', default=None, choices=['true', 'false'], help='An alarm by default will run the associated actions when \ any server in the host group violates the threshold, and then at the end when \ all servers are back within the threshold. If perHostNotify is set to true, \ the actions will run when ANY server in the group violates \ and falls back within the threshold.') self.parser.add_argument('-x', '--is-disabled', dest='is_disabled', action='store', default=None, choices=['true', 'false'], help='Enable or disable the alarm definition')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-i', '--host-group-id', dest='hostGroupId', metavar='host_group_id', action='store', required=True, help='Host group id to delete') self.parser.add_argument('-f', '--force', dest='force', action='store_true', help='Remove the host group, even if in use by a dashboard or alarm')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-f', '--file-name', dest='file_name', action='store', required=False, metavar='path', help='File name including path of data to plot')
def add_arguments(self): ApiCli.add_arguments(self) self.parser.add_argument('-f', '--file', dest='file_path', action='store', required=False, metavar='path', help='Path to plugin.json manifest. Defaults to plugin.json')