Monitoring and Logging in Artifactory Helm Installation

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
ft:sourceType
Paligo
Artifactory JMX Configuration in Helm Installation

Artifactory exposes MBeans under the org.jfrog.artifactory domain, which enables you to monitor repositories, executor pools, storage and HTTP connection pools. To learn more, see Artifactory JMX MBeans.Artifactory JMX MBeans

To enable JMX in your deployment use the following command.

Artifactory

artifactory:
 javaOpts:
   jmx:
     enabled: true

Artifactory HA

artifactory:
 primary:
   javaOpts:
     jmx:
       enabled: true
 node:
   javaOpts:
     jmx:
       enabled: true

This will enable access to Artifactory with JMX on the default port 9010; to change the port to your port of choice, use the setting artifactory.javaOpts.jmx.port.

To connect to Artifactory using JMX with jconsole (or any similar tool) installed on your computer, follow these steps.

  1. Enable JMX as described above and change the Artifactory service to be of type LoadBalancer.

    Artifactory

    artifactory:
     service:
       type: LoadBalancer
     javaOpts:
       jmx:
         enabled: true

    Artifactory HA

    artifactory:
     service:
       type: LoadBalancer
     primary:
       javaOpts:
         jmx:
           enabled: true
     node:
       javaOpts:
         jmx:
           enabled: true
    
  2. The default setting for java.rmi.server.hostname is the service name (this is also configurable using artifactory.javaOpts.jmx.host). To connect to Artifactory with jconsole, map the Artifactory Kuberentes service IP to the service name using your host file, as per the example below.

    Artifactory

    <artifactory-service-ip> artifactory-<release-name>

    Artifactory HA

    <artifactory-primary-service-ip>    artifactory-ha-<release-name>-primary
    <artifactory-node-service-ip>       <release-name>
  3. Launch jconsole with the service address and port.

    Artifactory

    jconsole artifactory-<release-name>:<jmx-port>

    Artifactory HA

    jconsole artifactory-ha-<release-name>-primary:<primary-jmx-port>
    jconsole <release-name>:<node-jmx-port>
Artifactory Filebeat Configuration in Helm Installation

If you want to collect logs from your Artifactory installation and send them to a central log collection solution like ELK, you can use this option.

Create a filebeat.yaml file with the following content.

filebeat:
  enabled: true
  logstashUrl: <YOUR_LOGSTASH_URL>
  resources:
    requests:
      memory: "100Mi"
      cpu: "100m"
    limits:
      memory: "100Mi"
      cpu: "100m"

Optionally, you can customize the filebeat.yaml to send output to a different location and then and use it with your Helm installation/upgrade.

filebeat:
  enabled: true
  filebeatYml: |
    <YOUR_CUSTOM_FILEBEAT_YML>

helm upgrade --install artifactory -f filebeat.yaml --namespace artifactory jfrog/artifactory
helm upgrade --install artifactory-ha -f filebeat.yaml --namespace artifactory-ha jfrog/artifactory-ha

This will begin sending your Artifactory logs to the log aggregator of your choice, based on your configuration in the filebeatYml.