How to log Apache HTTP Client traffic as Allure reports? - apache-httpclient-4.x

I would like Apache HTTP Client requests and responses to be logged in Allure Reports as attachments.
In traditional logging frameworks like logback, I do it in the following way:
<logger name="org.apache.http.wire" level="DEBUG">
How do I do it in Allure?

Related

How to send json syslog messages to a remote host with ulogd2

I am working on a project to log connection tracking events with ulogd2. I want to know if there is any way to send messages to a remote host in JSON format. So far, I was able to save the message to a JSON file on the local server, but I don't want to save it in the local machine, I just want to send it. Or maybe if there is a way to send the file and after that delete it.
I would really appreciate your help.
Usually syslog logs are sent to remote servers via one of the syslog network protocols, rsyslog is often used for this purpose. On the receiving end you can also use rsyslog to collect it into the syslog of the remote server.
On the receiving side you can also use tools like fluentd to collect the syslog messages and write them to a file as JSON or do a number of other tings with them. An alternative tool to do this as well is called filebeat.
You can also install tools on the server creating the logs, instead of rsyslog which you can configure to send them via some method other than the syslog protocol if you so desire. Filebeat can do this and fluent bit(lightweight version of fluentd) as well.

How to test that my Ultralight 2.0 IOT agent receives payload

I am using the Ultralight 2.0 IOT Agent.
Although I can see that the payload, that my gateway sends, is subscribed at a specific topic into the mosquitto MQTT broker, how could I test that the IOTAgent is listening at port 4061 and that it is receiving something from the broker?
I am refering to the IOTAgent-UL which is running on a CentOS 7 VM as a service. I have access to it with REST calls and I also see that the payloads, that my gateway sends, are subscribed into the MQTT broker. How could I pass my payloads from the mosquitto to the IOTAgent and after to the Context Broker?
thanks a lot!
What you are asking for seems to be related with the basic operational workflow of the IOTAgents in general. Thus, I'd recommend you to have a look to the following Step by step guide. It is based in another agent (the one for JSON payloads instead of UL) but most of the procedure is the same, so I think it could be useful.
EDIT: JSON format is documented here. UL format is documented here. Payload format is indepedent of the transport, i.e. is the same no matter if you use HTTP or MQTT.

Capture Apache httpclient transmitted data as part of TCP connections

In my application, I have used apache HttpClient. Now I would like to monitor the request and response from the capture data transmitted by the httpclient. Is it possible to know which ports are opened by the HttpClient. I am using Linux, so can I use netstat to see which ports are open by my java application process?
You can get detailed info about connection management by turning on context logging as described here

Mule ESB can be deployed in Application Server

Can I deploy Mule on any of the application server. If so how do we deploy the Mule examples.
I have configured my eclipse to run JBoss and Mule Flows dont get deployed in the JBOss server. The syncronisation gives error(null pointer).
But when I run as Mule Application it runs fine but starts Mule Server.
How does Mule deployed in the production? Do we need Mule server in production working along with the application Server?
Can we package all the application in one(ESB + application) and deploy it in the application server.
You have the choice regarding production deployments of Mule:
Use Mule standalone as your first choice, as it comes packed with all modules/transport, is production grade (control scripts...) and supports hot application reloads.
If your deployment environment forces you to deploy on application servers (like JBoss), package your Mule application as a web application (WAR).
If you decide to package your Mule application as a WAR, I strongly suggest you use Maven to do so, as they each Mule module/transport require numerous dependencies. Dealing with this by hand would be insane.
Also be sure to use Servlet inbound endpoints instead of HTTP inbound endpoints otherwise Mule will open another HTTP server inside the web container. You want Mule to use the servlet container for its inbound HTTP requests.
Yes you can. You might want to take a look to the Embedding Mule in a Java Application or Webapp manual page, and the Deploying Mule as a Service to Tomcat.

Is there an ldap server implementation that can query smtp for usernames/passwords?

My organization does not have a central LDAP server, but they do have a mail server. Is there some software out there (open source, hopefully) that acts as an LDAP server on the front end, but can query an SMTP instance on the fly to populate with users and passwords and present that as LDAP?
You could use the shell backend of OpenLdap to do that.
Basically you write a shell or Perl script that queries whatever other system you have and hook it up to openldap.
See:
http://www.openldap.org/doc/admin24/backends.html