How to use Jolokia for multiple processes in same host at the same time? - jolokia

I was trying to monitor heap usage of processes using jolokia and succeeded doing it for only one process
java -jar jolokia-jvm-1.3.7-agent.jar PID and using http://127.0.0.1:8778/jolokia/read/java.lang:type=Memory/HeapMemoryUsage but would like to monitor heap for each java processes and
Can we run multiple jolokia each on different port and each for one PID ?

You can run as many Jolokia agents on a host as you want to, as long as they are using different ports. Within a JVM it is recommended to run only on Jolokia agent. So when you use a Java application server, include Jolokia into the startup options of your app server.

Related

Running go program on Google Cloud Run without listening for incoming HTTP requests

I wrote a Go program which doesn't need to retrieve external http calls at all by default. I tried to deploy it on Google Cloud Run and received the following error:
The user-provided container failed to start and listen on the port
defined provided by the PORT=8080 environment variable. Logs for this
revision might contain more information.
I understand it happens because my code doesn't provide a port. As this answer states:
container must listen for incoming HTTP requests on the port
that is defined by Cloud Run and provided in the $PORT environment
variable
My question is what can I do if wouldn't like define any ports and just want to run the same code I run locally? Is there an alternate solution to deploy my code without it, or I must add it anyway if I want run the code from Cloud Run?
For containers that do not require an HTTP listener (HTTP server), use Cloud Run Jobs.
Cloud Run Jobs is in preview.
Your Go program must exit with exit code 0 for success and non-zero for failure.
Your container should not listen on a port or start a web server.
Environment variables are different from Cloud Run.
Container instances run until the container instance exits, until the task timeout is reached, or until the container crashes. Task timeout default is 10 minutes, max is one hour.
Cloud Run - Create jobs

Routing to receivers with daemon only - without network or service

When a sender specifies only daemon, without network and service, a receiver with similar settings can see messages on a given subject.
However if the sender specifies the daemon explicitly, and network with service, then the receiver (which specifies only daemon, and empty network and service) cannot see messages on subject or _LOCAL.subject - why is that?
And what would be the significance of _LOCAL (not routing beyond the daemon) for listening to subject or LOCAL.subject as long as everyone connects to the same daemon explicitl?
When a sender specifies only daemon, without network and service then it is using the following configuration :
. specified daemon
. default network (';' = the default broadcast address of the machine)
. default service = 7500
To be able to exchange Rendezvous messages applications need to share the same configuration (same network and service, two different daemons can be used if they are not running on the same host ).
This means that if an application is using a specific configuration (different from the default) that it defined explicitly and another application is using the default configuration they cannot communicate.
Message sent using the _LOCAL subject prefix remain local on the daemon used by the Publisher application, only Subscriber applications connected on the same daemon can receive this message (if they are subscribed to the prefixed subject).

Can Marathon assign the same randomly selected host_port across instances?

For my containerized application, I want to Marathon to allocate the same host_port for the container's bridge network endpoint for all instances of that application. Specifying the host port runs the risk of resource exhaustion. Not specifying it will cause a random port to be picked for each instance.
I dont mind a randomly picked port so long as it is identical across all instances of my application. Is there a way to request Marathon to pick such a host port for my container endpoint.
I think what you are really after is service discovery / load balancing. Have a look at the Marathon docs at
https://mesosphere.github.io/marathon/docs/service-discovery-load-balancing
to get an overview.
Also, see the Docker networking docs at
https://mesosphere.github.io/marathon/docs/native-docker.html
You can probably either make use of the hostPort or the more general ports properties.

How check the restSecureServicesPort is available?

I've installed a application with a service on a Windows Server 2012 R2. The status of the service is paused. When I start the service, he runs for two seconds and he's again paused.
In the instructions from the manufacturer is written:
Note: If the service shows as paused, check the restSecureServicesPort is available.
What does that mean? What should I do?
This could mean, that you application hosts a REST service on this Windows service. REST (REpresentational State Transfer) is a simple stateless architecture that generally runs over HTTP. This means it needs a port on which the application listens and receive data. This port is probably already busy and another application uses it. To view all busy ports you could use the netstat command via the command line on your server. But first you have to find out on which port your application wants to listen (maybe through some documentation of the application).
After this you could check if it's possible to change the port of your application or the port of the application which occupies this port.
Hope this helps!

Is it feasible to use "snmp agent" instead of "zabbix agent" to monitoring the servers with Zabbix?

I want to monitor some servers in a cluster with Zabbix. if it is feasible to use "snmp agent" instead of "zabbix agent" to monitoring the servers, I will not install zabbix agent in every server.
So what is the advantage of zabbix agent than the snmp agent?
It depends on which parameters would you like to monitor. We are using SNMP monitoring on hosts (clusters and standalones) where vendor does not allow installation any other application except from himself.
Even in case of SNMP you need to modify configuration of your SNMP daemon on monitored host. But in some cases default configuration is sufficient to monitor at least some values without any installation/configuration/modification on monitored host. Be advised that the network must allow SNMP traffic (161/udp). I don't need to mention that SNMP v1 and v2c can be seen by somebody listening on the network. Values which can be monitored by SNMP daemon are listed in OID list http://www.alvestrand.no/objectid/top.html.
On the other hand Zabbix agent can monitor similar values like SNMP daemon. Additionaly there are some parameters which are more complex (like DNS response etc.). The list of values which can be monitored by Zabbix agent is on https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/zabbix_agent

Resources