All Apps and Add-ons

MongoDB Commands app: "MissingSectionHeaderError" when calling command "|mongoshowdb"

vbhakta88
Engager

I am trying to use the Splunk app MongoDB Commands to gather data from a MongoDB instance. I want to be able to query the data and display it in Splunk.

When I call the command "|mongoshowdb" I get this error:
MissingSectionHeaderError at "C:\Program Files\Splunk\Python-2.7\Lib\ConfigParser.py", line 512 : File contains no section headers. file: C:\Program Files\Splunk\etc\apps\mongodb_commands\bin..\local\mongodb.conf, line: 1 '\xef\xbb\xbf\n'

0 Karma
1 Solution

vbhakta88
Engager

I figured it out. The file C:\Program Files\Splunk\etc\apps\mongodb_commands\local\mongodb.conf had a UTF-8-BOM encoding but when I changed it to just UTF-8 it worked. I used notepad++ to edit the encoding since that is what I was using to view the file.

View solution in original post

0 Karma

vbhakta88
Engager

I figured it out. The file C:\Program Files\Splunk\etc\apps\mongodb_commands\local\mongodb.conf had a UTF-8-BOM encoding but when I changed it to just UTF-8 it worked. I used notepad++ to edit the encoding since that is what I was using to view the file.

0 Karma

isabellechristo
New Member

Hello,
my problem is : I Have no file mongodb.conf and I don't know what I must put inside

0 Karma

isachristophe
New Member

Hello,

What information did you put in mongodb.conf ?

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...