Confluence Custom Macro Development: feasibly request

Howdy --

Recently, my team has started using Confluence as a complete knowledge base around our infrastructure and requirements. It's a rather large effort transferring years of knowledge into any system, and I just have a question on the feasibility of custom macro's. Also I apologize if I'm not using the appropriate terminology – I might actually want a widget or site link or some other term, but please bear with me.

 

The idea we've embraced is Confluence is the authoritative copy of our documentation – the up to date, relevant place to find information. This works for a lot of things, but what if an external service is really where the data is – when making changes, you have to update it in two places. I, being a good developer and adhering to the DRY principle, see this as suboptimal and have seen some documentation online where you can write custom macros in eclipse. It's a bit unclear to me (hence this question) on how far you can take it, and if any of this is available in the Cloud offering (or if there is an alternative)... but lets take a look at this case study.

 

I use a load balancer, but it has a cumbersome UI and various things can change it. However, it does contain one important thing used by my team to monitor/maintain our environment, namely, server pool membership – which IPs are active serving requests. I want to have this knowledge in Confluence so I don't have to worry about all the hard things like user access, user training, etc... but I need to ensure the confluence data is up to date. If the load balancer is the authoritative copy, ideally, I want to reference it directly from confluence. Is this possible using a custom built macro, or widget? If so are there any good guides you guys could link to for Confluence Cloud specifically? The way I envision it is pretty simple, regular requests to the load balancer API with some sort of caching if that's provided in the platform. I'm a developer, I can figure out how to do it, I'm just not familiar with the limitations and constructs of Confluence itself.

 

Thanks in advance,

James

1 answer

1 accepted

3 votes

Hi James. Let me first try and make sure that I understand what your requirements are:

  • You have data that is external to Confluence but is the authoratative source of information.
  • This data cannot easily be imported into Confluence once; but will rather have to be re-imported multiple times.
  • This may be the case for many different sources of data.

And your question is: how do I ingest these data sources into my cloud instance?

The answer to your question, in a word, is Atlassian Connect: http://developer.atlassian.com/static/connect/docs/guides/getting-started.html

What you want to do is:

  • Write an Atlassian Connect service that integrates with these other data sources.
    (Using whatever security methods that you want / need)
  • Write Confluence Macros in this Atlassian Connect addon so that you can surface the data in any Confluence pages.
  • Upload this Atlassian Connect addon to the Atlassian Marketplace as a free BUT private addon so that only you can install it on your own instance.
  • Actually install it on your instance.

This solution obviously requires you to be a software developer or to get your hands on one. But it will give you exactly what you need and I see nothing blocking you from doing this to solve your very specific data ingestion needs.

 

A dynamic content macro sounds like what you need. Read the first paragraph at this link to see if you think it fits your use case: https://developer.atlassian.com/static/connect/docs/latest/modules/confluence/dynamic-content-macro.html

Thank you for the information. This point in the right direction is what I needed.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

386 views 17 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you