Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

How to create a Regex to grab information from Security Credentials


#1

Good Afternoon:

I’d like to know how to collect multiples Security Credentials:

I do have this variable:
var urlsToMonitor = $secure.CERTS_TO_MONITOR.split(’,’);

Let say that I have 100 credentials with the names:
CERTS_TO_MONITOR_1
CERTS_TO_MONITOR_2
CERTS_TO_MONITOR_3

CERTS_TO_MONITOR_100

How can I do a Regex to collect from each security credentials? And save it in a array list?

Thanks in advanced.

New Relic edit

  • I want this, too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.


#2

Hi @danielrocha - As the synthetic language is based on javascript, you should be able to use a standard javascript regex expression. There are many samples, and some sites which provide testing of your regex, across the internet.


#3

Hi @danielrocha -

Looks like you also worked this out in a private ticket. I wanted to share the conclusion of the ticket for others here in the community.

We don’t offer the ability to create Regex to grab information from secure credentials. This is due to how secure credentials is set up. We retrieve and inject at the runtime into a script based on explicit references to the specific secure credentials in the script body. Because of this, you wouldn’t be able to programmatically retrieve these values how you mentioned you would like to.

That said, we realize your use case is a good one. I’ve added a poll to this thread and moved it into the feature ideas category so that others can weigh in as well.