Open prashant462 opened 1 month ago
Can you say how you are calling the code? The parameters to the function? What is the return value? Are you getting an error? Have you tried calling without specifying any parameters?
Hi @ottobackwards ,
I called the below method. controller_types = nipyapi.canvas.list_all_controller_types() for controller in controller_types: print(controller.type + " : " + controller.description) print("===============================\n")
The list I am getting is attached. controller_types.txt
From what I can see the PrometheusRecordSink is the only Prometheus service, and it is returned: https://nifi.apache.org/documentation/v1/ I'm not sure this is the right call
I think what you need is the flow api's get_reporting_task_types. This isn't exposed at the canvas layer yet. @Chaffelson ?
From what I can see the PrometheusRecordSink is the only Prometheus service, and it is returned: https://nifi.apache.org/documentation/v1/ I'm not sure this is the right call
@ottobackwards, yeah in list of Prometheus services PrometheusRecordSink is only visible there which is not a reporting task.
@ottobackwards I tried with nipyapi.nifi.ControllerApi().create_reporting_task() it is working fine, this method not given in nipyapi docs . But already provided in nipyapi code.
What I am saying is that you are using the wrong method to get all the Reporting task type names, it isn' t controller types, it is the get_reporting_task_types.
What I am saying is that you are using the wrong method to get all the Reporting task type names, it isn' t controller types, it is the get_reporting_task_types.
okkk , got it . Thanks @ottobackwards for your help
Description
I have a usecase where I have to add reporting task (PrometheusReportingTask) using nipyapi , but not getting any method to do that.
What I Did
I tried listing all controller types in nifi env using nipyapi.canvas.list_all_controller_types() but not getting any controller of type PrometheusReportingTask. But using nifi UI I am getting option to add the same.
Urgency
For my production nifi flows I have to implement this, Please let me know If there is any method for adding a PrometheusReportingTask using nipyapi or any workaround for this. @Chaffelson