Skip to content

The exporter does not work with multiple passenger applications. #8

@dreig

Description

@dreig

If there are several passenger apps running, the exporter will return the following error:

An error has occurred during metrics collection:

collected metric passenger_nginx_app_group_queue label:<name:"default" value:"true" > gauge:<value:0 > was collected before with the same name and label values

This is due to this metric:

ch <- prometheus.MustNewConstMetric(e.appGroupQueue, prometheus.GaugeValue, parseFloat(sg.Group.GetWaitListSize), sg.Group.Default)

that uses label: default, but its value is always true:

Below is the edited output of passenger-status --show=xml when runing two apps.

<?xml version="1.0" encoding="iso8859-1"?>
<info version="3">
   <passenger_version>6.0.1</passenger_version>
   <group_count>2</group_count>
   <process_count>6</process_count>
   <max>6</max>
   <capacity_used>6</capacity_used>
   <get_wait_list_size>0</get_wait_list_size>
   <supergroups>
      <supergroup>
         <name>APP_1-NAME</name>
         <state>READY</state>
         <get_wait_list_size>0</get_wait_list_size>
         <capacity_used>3</capacity_used>
         <group default="true">
            <name>APP_1-NAME</name>
            <component_name>APP_1-NAME</component_name>
            <app_root>/path/to/APP_1/current</app_root>
            ....
            <options>
               <app_root>/path/to/APP_1/current</app_root>
               <app_group_name>APP_1-NAME</app_group_name>
               <app_type>ruby</app_type>
               ....
            </options>
            <processes>
               <process>
                  <pid>5465</pid>
                  ....
               </process>
            </processes>
         </group>
      </supergroup>
      <supergroup>
         <name>APP_2-NAME</name>
         <state>READY</state>
         <get_wait_list_size>0</get_wait_list_size>
         <capacity_used>3</capacity_used>
         <group default="true">
            <name>APP_2-NAME</name>
            <component_name>APP_2-NAME</component_name>
            <app_root>/path/to/APP_2/current</app_root>
            <app_type>ruby</app_type>
            ....
            <options>
               <app_root>/path/to/APP_2/current</app_root>
               <app_group_name>APP_2-NAME</app_group_name>
               <app_type>ruby</app_type>
               ....
            </options>
            <processes>
               <process>
                  <pid>27619</pid>
                  ....
               </process>
            </processes>
         </group>
      </supergroup>
   </supergroups>
</info>

Notice the two <group default="true"> elements.

Do you know if this can be solved with some passenger configuration options? or should the metric label be changed ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions