All Apps and Add-ons

SSL Certificate Lookup - multiple with custom port

svarendorff
Explorer

After some help. Is there any way to get this to use a custom port for the 2 server that use a non 443 port?

| makeresults
| eval dest="url1,url2,url3", dest = split (dest,",")
| mvexpand dest
| lookup sslcert_lookup dest OUTPUT ssl_subject_common_name ssl_subject_alt_name ssl_end_time ssl_validity_window
| eval ssl_subject_alt_name = split(ssl_subject_alt_name,"|")
| eval days_left = round(ssl_validity_window/86400)
| table ssl_subject_common_name ssl_subject_alt_name days_left ssl_issuer_common_name
| sort days_left

 

I tried adding the port to the first eval e.g.

| eval dest="url1,url2,url3",  dest_port=8443 , dest = split (dest,",")

 

Would be great if both the standard and custom could be returned together.

Labels (1)
0 Karma

svarendorff
Explorer

Figured it out.

| makeresults
| eval dest="url1,url2,url3", dest_port=8443, dest = split (dest,",")
| mvexpand dest
| `sslcert(dest, dest_port)`
| lookup sslcert_lookup dest, dest_port OUTPUT ssl_subject_common_name ssl_subject_alt_name ssl_end_time ssl_validity_window
| eval ssl_subject_alt_name = split(ssl_subject_alt_name,"|")
| eval days_left = round(ssl_validity_window/86400)
| table ssl_subject_common_name ssl_subject_alt_name days_left
| sort days_left

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...