Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,858
Community Members
 
Community Events
176
Community Groups

Why System Metrics leave blank data on my Statuspage while I'm sending data.

Hello everyone,

I use Statuspage API to send data to my metrics every minute but after some moment (4hours) there is a blank In the graphic and I don't know why. I checked if my app was still sending data and yes I even receive response from the API. If I don't restart the app every time there would be no data for a while. 

And some times the data is filled 1 hour later, could it be from the cache of my browser ?

So I'm asking the community if I'm doing something wrong.

Code:

I'm using JavaScript, I've used the example that was given by Statuspage but I modified it a bit so it could work with the rest of my app.

First of all the condition on line 4 was effective but when I saw that there was a blank in the data and that this condition was true while sending the data (came from the code of Statuspage) I've decided to disabled it.  

So I don't know if the fact that I'm sending data every minute is an issue or I just need to care more attention at the data points (every 5 minutes)

If someone could help me...

Thanks for your time,

Tim S.

ps: If this code seems you non optimised don't worry it's test code.

async function submit(count, botping) {

    count = count + 1;

   console.log('submitting');

   //if(count > totalPoints) return;

   console.log('submitted');

   var url = apiBase + '/pages/' + pageId + '/metrics/' + metricId + '/data.json';
   

    var currentTimestamp = epochInSeconds - (count - 1) * 5 * 60;

    var randomValue = Math.floor(Math.random() * 1000);

   

    options1 = {

        method: 'POST',

        url,

        headers: {

            'Authorization': 'OAuth ' + apiKey,

            'Content-Type': 'application/json'

        },

        data: {

            data: {

            timestamp: currentTimestamp,

            value: botping,

            }

        }

    };

    console.log(options1);

    const res = await axios.request(options1).catch((error) => {

        console.log(error)

    });

    console.log(res.data.error); // That is the undifined on the screenshot

    console.log(res.data);

  }
 

 IMG_20210612_135442.jpgIMG_20210612_135532.jpg

1 answer

Hello,

I just saw after 2 days that the problem is not mine it's the Statuspage metric which update 4-5h later.

 

Does somebody know why ?

Thanks,

Tim S.

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events