Get all process groups using Nifi-api including sub-processor groups - apache-nifi

I would like to access all the ids of processor and sub-processor groups in an nifi environment . Is there a rest-api call available for the same.

Related

Consul API, Retrieve services instances list from all nodes

I've explored service catalog, all I can see are the actual Service names, but not each service instance.
for e.g using Consul API/CLI,
I can only see Service-A,
But I prefer to see all instances under it.
Service-A-abc
Service-A-xyz
Service-A-123
How can I get the all services instances from all nodes together?
You can't get this information directly.
The only way to get an entire list is to write a script that first enumerates the services by name (/v1/catalog/services) and then enumerates the instance by service name (/v1/catalog/service/<service_name>).
Rinse and repeat.

Share Nifi Controller Service

How can I share a Controller Service between process groups? I built a DBCPConnectionPool and use it in a process group. I need it in another process group. In a nutshell, I want one DBCPConnectionPool at root and use it in process groups.
Create the process group in the parent process group of the groups you want to share it in. For example, if you create it on the root group (top-level canvas), it would be usable by any sub-process groups.

How do I create hierarchical AWS Security Groups?

I want to create a 2-level security group heirarchy in AWS.
Location Groups - groups of IP addresses specific to different locations (e.g. "office", "home", "customer 1", etc.). Each of these base groups grants each IP access to All Traffic (ports 0-65535)
Environment Groups - I then am trying to add these base Location Groups to my higher-level Environment Groups (e.g. "test", "prod", "reporting db", etc.). I will use Environment groups for my different instances in EC2. So a server "uat_01" for example will reference the "test" environment group, which will in turn grant access to "office", for example.
Here's my inbound rule setup for security group sg-f2d8.... (office)
I'm adding the base groups using port ranges for access to HTTP (or HTTPS, or MySQL, etc., based on need), and referencing the base group using "Custom" configuration with the group identifier, e.g. "sg-f2d8...."
In the Security Groups panel, everything looks ok, but I can't get access from the selected IPs.
Please help! I've been told EC2 Security Groups can reference base groups this way, but I can't seem to figure it out!
Thanks!
When you put a security group as the source of an inbound rule (or destination for an outbound rule) you are referencing the resources associated with that group (i.e. the ec2 instances that you create that belong to said group) not really allowing the traffic that the group would allow (this is kind of a common misconception on aws-security groups). There is also no transitivity between security groups by referencing them this way.
Now in order to achieve what you want to achieve, the only workaround i can think about is creating groups of the style home-test, office-test, home-prod and putting in each one the source ip that you would see fit. At the end of the day these would be just "1-level" security groups.
The formal answer would be that no, you cannot create hierarchical aws sec groups.

Getting all security groups on EC2 via ansible

so I am running ansible against EC2. I need to filter the security groups by their tags. My approach was to get all the security groups and parse them for the required tags, but I am unable to get all the security groups that are present.
Is there a way to either get all the security groups or filter a security group based on a tag and get it's ID?
you could use aws command line interface to fetch security group info and add filters to choose specific security groups. for example, if i wanted to fetch all security groups that were tagged with a tag value of 'Production', this works:
aws ec2 describe-security-groups --filters Name=tag-value,Values=Production
using the command line like this requires that you've configured the command line with your specific AWS credentials (see http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html)
HTH
If you can use Ansible > 2.3 then use ec2_group_facts
You should be able to filter the sections you want either using the filters option in the module or by using a when statement in the Ansible.

How to run Jmeter remotely on multiple slaves to stress multiple servers

I have a requirement wherein I need to run different jmeter testplans on different target servers. I went through this PDF here, but it does not meet my requirements. It explains how to stress a "single" webserver from different slaves using single jmeter master. But my requirement is to stress different servers from different slaves using single jmeter master. One way I could find is like below
Open multiple jmeter GUI instances on the jmeter master.
Create different testplans in each jmeter instance (basically these testplans differ only in terms of target server and login information)
Go to Run -> Remote Start -> Choose different slave in each instance
But I don't like this myself. Is there any better way to achieve this..?
Not sure that it`s a best way, some workaround:
Start the jmeter servers with some parameter :
SERVER_PORT=44444 ./jmeter-server -Jparam=1 &
SERVER_PORT=44445 ./jmeter-server -Jparam=2 &
SERVER_PORT=44446 ./jmeter-server -Jparam=3 &
Add this parameter in your testplan (in user defined variables):
And in testplan add a thread group and inside of this thread group a several If controllers with conditions like a ${__javaScript(${param}==1)}. Inside these If controllers put your different testplans:
Theriotically, they will start to work with different "branches". Also you can change the number of users depends of this parameter by using Beanshell and to use different pools for user names/password using CSV controller. ( /home/pools/${param}/pool.csv)

Resources