Example #1
0
    def get(self, host_id):

        try:
            metric, operation, start, end, limit = parse_fields()
            print metric, operation, start, end, limit
            return ams_fs_core.get_metrics_json(APP_ENVIRONMENT['dataframe'],
                                                metric,
                                                host_id, int(start), int(end),
                                                int(limit), operation)
        except FieldsParseError, e:
            return str(e), 404
Example #2
0
 def get(self, component_id):
     try:
         metric, operation, start, end, limit = parse_fields()
         print metric, operation, start, end, limit
         APP_ENVIRONMENT['last_metric'] = metric
         return ams_fs_core.get_metrics_json(APP_ENVIRONMENT['dataframe'],
                                             metric,
                                             None, int(start), int(end),
                                             int(limit), operation)
     except FieldsParseError:
         return ams_fs_core.get_components_json(component_id)