nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grande <agra...@hortonworks.com>
Subject Re: processor stats and count
Date Thu, 28 Jan 2016 15:40:32 GMT
I was reviewing the ListenSyslog processor and noticed how it exposes message counters. These
are then available in the admin UI, and I suppose, would be returned in that API call result
as well.

I haven't found any mention of these counters in user or dev guides, did I miss it?

I would like to leverage that feature next to e.g. maintain counts of messages received per
topic in a processor.

Andrew



On Wed, Jan 27, 2016 at 8:05 AM -0800, "Matt Gilman" <matt.c.gilman@gmail.com<mailto:matt.c.gilman@gmail.com>>
wrote:

Philippe,

You have a couple options.

1) You could write a Reporting Task that does this. We already offer a Reporting Task that
takes this stats and writes them to a log file [1].

2) You could use the REST API to get the status. The endpoint in question would be

/nifi-api/controller/process-groups/{process-group-id}/status?recursive=[true|false]

When recursive is set to false, this call will return the status for all child components
of the specified Process Group. When recursive is set to true, this call will return the status
for all descendent components of the specified Process Group.

The counters are a different concept then the stats. A component may choose to use counters
to track or aggregate some value. They would be reported here.

Matt

[1] https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-reporting-tasks/src/main/java/org/apache/nifi/controller/ControllerStatusReportingTask.java

On Wed, Jan 27, 2016 at 10:56 AM, <philippe.gibert@orange.com<mailto:philippe.gibert@orange.com>>
wrote:
Hello,


1)      I would like to know if it is  possible to get the stats from 1 processor running
and send them ( bytes read , written, transferred in last  5min,...  etc ...)
To an external  consumer outside of  Nifi  for example a kafka broker


2)      I had a glance to counters  returned here
http://localhost:8080/nifi-api/controller/counters

<countersEntity>
<revision>
<clientId>e0b588dd-7872-4a23-976c-e5d5c6828016</clientId>
</revision>
<counters>
<generated>15:47:53 UTC
</generated>
</counters>
</countersEntity>


But The returned XML is always  empty ....:-)

Philippe
Best regards



_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees
et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par
erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant
susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may
be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message
and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed
or falsified.
Thank you.



Mime
View raw message