IngressMonitorController icon indicating copy to clipboard operation
IngressMonitorController copied to clipboard

Invalid application key error even though it's correct - Pingdom

Open tomjohnburton opened this issue 5 years ago • 10 comments

Am I doing something stupid here...? This is my config map set up

data:
  config.yaml: |-
    providers:
    - name: Pingdom
      apiKey: fdjsfhksdnskfjNOTREALAPIKEYndkjsbfskdjdf
      apiURL: https://api.pingdom.com/
      username: my-email
      password: my-password
    enableMonitorDeletion: true
    monitorNameTemplate: "{{.Namespace}}-{{.IngressName}}"
    # how often (in seconds) monitors should be synced to their Kubernetes resources (0 = disabled)
    resyncPeriod: 0
    # creationDelay is a duration string to add a delay before creating new monitor (e.g., to allow DNS to catch up first)
    # https://golang.org/pkg/time/#ParseDuration
    creationDelay: 0

Just constantly fails with msg="Error received while listing checks: 403 Forbidden: Invalid application key"

tomjohnburton avatar Nov 11 '19 12:11 tomjohnburton

Pingdom has since updated their api with different to accept a different kind of apiKey. Has this change been reflected in the code?

Also it would be worth updating the tutorial documentation to reflect this.

https://medium.com/stakater/automating-uptime-monitoring-on-kubernetes-with-pingdom-6a40977f82e1

tomjohnburton avatar Nov 11 '19 12:11 tomjohnburton

Hi @tomjohnburton we haven't made any changes in the code to use the new API :( would you like to make a PR?

We mostly work & maintain uptimerobot!

If you can't then we will definitely update the code and the tutorial as soon as we get time; great thanks for pointing out

rasheedamir avatar Nov 13 '19 19:11 rasheedamir

Hey guys. @rasheedamir any updates on this one? I am just trying it and I see the same errors. BTW I am currently playing with it and I am wondering, why do you need username and password for pingdom? You can create checks, list checks with the provided apiKey & apiUrl as long as it has read/write permissions. Probably, you can consider removing it at all.

bogdan-alov avatar Jun 01 '20 14:06 bogdan-alov

I am also facing the same issue. Any ETA by when can we expect this to be fixed?

Juhibhadviya19 avatar Jun 05 '20 11:06 Juhibhadviya19

@rasheedamir Looks like you have a pretty complicated situation on your hand right now...

You are depending on this library... https://github.com/russellcardullo/go-pingdom

Which also has the same API Key problem.. Basically, Russel needs to update his library, before your ingress-controller will work. He actually wrote a terraform plugin which depends on his library, that's how I ended up finding out.

This might be functional right now (using the version 1 API), but the version 1 API is going to be deprecated by the end of the year on Pingdom.

Should the README be updated making a statement that pingdom is only supported by the V1 API which will be deprecated by the end of the year?

sig-piskule avatar Aug 12 '20 18:08 sig-piskule

Also... Just so you know...

There is a pull request to Russel to update his libary...

https://github.com/russellcardullo/go-pingdom/pull/57

sig-piskule avatar Aug 12 '20 19:08 sig-piskule

Once that pull request gets merged, it should be a pretty easy fix. You should just need to drop the username/password/account e-mail and only support the API token.

sig-piskule avatar Aug 12 '20 19:08 sig-piskule

@rasheedamir The library you depend on, go-pingdom was just updated yesterday to address this problem.

https://github.com/russellcardullo/go-pingdom

Any chance you could update your code? It should be very easy-- basically you just drop the Username, Password, and AppKey, and replace that with an API key. It really ought to just be removing and renaming some variables in the constructors.

sig-piskule avatar Sep 15 '20 15:09 sig-piskule

One other thing, the way Russell altered his code was such that it is no longer compatible with API v2 for pindom, so this would be a breaking change for anyone who updates. I think that is reasonable, because the V2 API will be deprecated in december.

sig-piskule avatar Sep 15 '20 15:09 sig-piskule

I've made PR #287 with a fix of this problem and it has been merged.

artemlive avatar Oct 22 '20 08:10 artemlive