Splunk Enterprise

Why is moment.js not available in splunk 9.1.x+?

jabezds
Path Finder

Hi,

In the splunk 9.1.x version and above,  we are noticing that the moment.js is missing in the following location, /opt/splunk/share/splunk/search_mrsparkle/exposed/js/contrib/moment.js

Due to this our custom app functionalities are not working and we are getting error as attached, Please let us know if this is a known issues and any resolutions for this.

In spite of  placing the moment.js in our app folder we still notice the app is trying to use the default moment js in this location "/opt/splunk/share/splunk/search_mrsparkle/exposed/js/contrib/moment.js" 
We have also tried other solution from the community by  placing  var moment = require('moment'); but still its returning error. 

Can you please provide any possible  solution to resolve this issue.

image (1).png

Tags (1)

norbertt911
Path Finder

Hello,

First of all, I'm far far away from Java scripting. But maybe those who know this could help:

Seems to me Splunk removed the moment.js after the update. For me, it's still can be found in  /opt/splunk/quarantined_files/share/splunk/search_mrsparkle/exposed/js/contrib/ folder.

The new(?) version is supposed to be here:

/opt/splunk/share/splunk/search_mrsparkle/exposed/js/contrib/moment/lang/ , but it seems now "localised"

Or I'm totally wrong 🙂 Please share your thoughts, I faced the same issue with Cisco Cloud Security App

 

Regards, Norbert

0 Karma

norbertt911
Path Finder

... I tested it if you copy back the moment.js from /opt/splunk/quarantined_files/share/splunk/search_mrsparkle/exposed/js/contrib/ 

to 

/opt/splunk/share/splunk/search_mrsparkle/exposed/js/contrib/

The Cisco app works. But this is a hack and Splunk will complain about the file integrity. I think Cisco needs to update its app.

0 Karma

dimasfs
Explorer

Same issue here

0 Karma

jabezds
Path Finder

jabezds_0-1694674913165.png

http://...@b6436b649711.1/js/contrib/moment.js it seems moment.js is missing in this location , we verified in splunk 9.1.x+ this internal splunk file seems to be missing...

avishowman
Engager

I am also facing same issue. did you find any solution?  

norbertt911
Path Finder

Hi All,

I opened a ticket at Cisco support and they promised that the app will be updated soon.

KR

0 Karma

Gewch
Engager

Any update on this?

I installed v 1.0.40 and still have the same problem with moment.js.

0 Karma

norbertt911
Path Finder

Hello,

1.0.40 working fine for me.

- clear your browser cache or use a different browser/incognito mode

Note: the configuration changed. You need to set a new API key even for the Overview dashboards....

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...