Codebase list ceilometer / 8e57a3a
Exclude metrics from "service" project Upon installing ceilometer and gnocchi using devstack, "filter_project" in "pipeline.yaml" is set to "gnocchi_swift" project. However, no such project exists in keystone. ``` publishers: - gnocchi://?archive_policy=ceilometer-low&filter_project=gnocchi_swift ``` This change, will set "filter_project" to "service" project which will exclude all metrics from it. Also add the name of the project to the logs which couldn't be found in keystone. Closes-Bug: #1988923 Signed-off-by: Yadnesh Kulkarni <ykulkarn@redhat.com> Change-Id: Ifc215f86134729665c142bb9bf64f66ca8de2a29 Yadnesh Kulkarni 1 year, 8 months ago
3 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
286286 name=self.filter_project,
287287 domain=self.filter_domain)
288288 except ka_exceptions.NotFound:
289 LOG.warning('filtered project not found in keystone,'
289 LOG.warning('project %s not found in keystone,'
290290 ' ignoring the filter_project '
291 'option')
291 'option', self.filter_project)
292292 self.filter_project = None
293293 return None
294294 except Exception:
338338 def test_activity_gnocchi_project_not_found(self, logger):
339339 self.ks_client.projects.find.side_effect = ka_exceptions.NotFound
340340 self._do_test_activity_filter(2)
341 logger.warning.assert_called_with('filtered project not found in '
341 logger.warning.assert_called_with('project %s not found in '
342342 'keystone, ignoring the '
343 'filter_project option')
343 'filter_project option', 'service')
344344
345345 def test_activity_filter_match_swift_event(self):
346346 self.samples[0].name = 'storage.objects.outgoing.bytes'
207207 if [ "$CEILOMETER_BACKEND" = 'none' ] ; then
208208 echo_summary "All Ceilometer backends seems disabled, set \$CEILOMETER_BACKEND to select one."
209209 elif [ "$CEILOMETER_BACKEND" = 'gnocchi' ] ; then
210 sed -i "s/gnocchi:\/\//gnocchi:\/\/?archive_policy=${GNOCCHI_ARCHIVE_POLICY}\&filter_project=gnocchi_swift/" $CEILOMETER_CONF_DIR/event_pipeline.yaml $CEILOMETER_CONF_DIR/pipeline.yaml
210 sed -i "s/gnocchi:\/\//gnocchi:\/\/?archive_policy=${GNOCCHI_ARCHIVE_POLICY}\&filter_project=service/" $CEILOMETER_CONF_DIR/event_pipeline.yaml $CEILOMETER_CONF_DIR/pipeline.yaml
211211 ! [[ $DEVSTACK_PLUGINS =~ 'gnocchi' ]] && configure_gnocchi
212212 else
213213 die $LINENO "Unable to configure unknown CEILOMETER_BACKEND $CEILOMETER_BACKEND"