Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text format parsing error: second TYPE line for metric name "ssh_exporter", or TYPE reported after samples #20

Open
noizo opened this issue Dec 11, 2018 · 0 comments

Comments

@noizo
Copy link

noizo commented Dec 11, 2018

Hi.
I'm using current master build of ssh_exporter
Prometheus is 1.7.1

ssh_exporter config:

version: v0
scripts:
  - name: bastion_toolbox
    script: echo success
    timeout: 1s
    pattern: success
    credentials:
    - host: 1.ssh.host
      port: "22"
      user: monitoring
      keyfile: ./bastion_check.pem
      scriptresult: ""
      scriptreturncode: 0
      scripterror: ""
      resultpatternmatch: 0
    parsedtimeout: 1s
    ignored: false
  - name: bastion_management
    script: echo success
    timeout: 1s
    pattern: success
    credentials:
    - host: 2.ssh.host
      port: "22"
      user: monitoring
      keyfile: ./bastion_check.pem
      scriptresult: ""
      scriptreturncode: 0
      scripterror: ""
      resultpatternmatch: 0
    parsedtimeout: 1s
    ignored: false

Prometheus config:

  - job_name: 'bastion_ssh_exporter_toolbox'
    static_configs:
      - targets: ['ssh_exporter:9428]
    metrics_path: /probe
    params:
      pattern: ['bastion_toolbox']
  
  - job_name: 'bastion_ssh_exporter_management'
    static_configs:
      - targets: ['ssh_exporter:9428']
    metrics_path: /probe
    params:
      pattern: ['bastion_management']

Prometheus gives me this output:

text format parsing error in line 5: second TYPE line for metric name "ssh_exporter", or TYPE reported after samples

Console output

# curl http://localhost:9428/probe?pattern=bastion
# HELP ssh_exporter_bastion_toolbox_exit_status Integer exit status of commands and metadata about the command's execution.
# TYPE ssh_exporter gauge
ssh_exporter_bastion_toolbox_exit_status{name="bastion_toolbox",host="1.ssh.host",user="monitoring",script="echo success",exit_status="0"} 0
# HELP ssh_exporter_bastion_toolbox_pattern_match Boolean match of regex on output of script of commands and metadata about the command's execution.
# TYPE ssh_exporter gauge
ssh_exporter_bastion_toolbox_pattern_match{name="bastion_toolbox",host="1.ssh-host",user="monitoring",script="echo success",regex="success"} 1
# HELP ssh_exporter_bastion_management_exit_status Integer exit status of commands and metadata about the command's execution.
# TYPE ssh_exporter gauge
ssh_exporter_bastion_management_exit_status{name="bastion_management",host="2.ssh.host",user="monitoring",script="echo success",exit_status="0"} 0
# HELP ssh_exporter_bastion_management_pattern_match Boolean match of regex on output of script of commands and metadata about the command's execution.
# TYPE ssh_exporter gauge
ssh_exporter_bastion_management_pattern_match{name="bastion_management",host="2.ssh.host",user="monitoring",script="echo success",regex="success"} 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant