Migrate configuration - Mongodb and Content Pack

Hi all, following this post Migrate configuration or Upgrade?
i got a clear installation of Graylog 2.4

In order to migrate configuration from Graylog 2.0 to Graylog 2.4 i got stuck on migrate mongo Database.

root@graylog:~# sudo mongodump -h 127.0.0.1 -d graylog -o /home/ubuntu
connected to: 127.0.0.1
Wed Dec 12 13:03:24.023 DATABASE: graylog to /home/ubuntu/graylog
root@graylog:~# ls /home/ubuntu/

/home/ubuntu/ is empty (note that i try also using root user)

Also check mongodb vs mongodump version
imagen

Any ideas? thanks!

Hi again, in old graylog (v2.0 OVA)

I run this commands:


(WARNING: Insecure configuration, access control is not enabled .)

I don’t understand why i can’t see tables.

Same commands on the new graylog 2.4, mongodb v3.6.9 :
imagen

Any help will be appreciated, thanks!

I see that you connected without authenticating.

@jan, does the Graylog OVA not use an application account for Graylog in MongoDB?

Thanks for reply @Totally_Not_A_Robot, i think that too, but i get this message when i connect to mongodb:

“** WARNING: Insecure configuration, access control is not enabled and no --bind_ip has been specified.
Read and write access to data and configuration is unrestricted,
and the server listens on all available network interfaces.”

Still get no file with mongodump.

Thanks!

@jan, does the Graylog OVA not use an application account for Graylog in MongoDB?

I’m not sure about that old version. Might be not implemented at that point.

@monchito sorry I’m not able to investigate in this, but I guess someone else is able to help you.

Hi, there is another way to the export the db … get json file or something like that?

Thanks!

Of course :slight_smile: I don’t use mongodump in our environment, I use mongoexport

Hi again, first: thanks so much for helping.

I exported content pack and mongodb (with mongoexport/mongoimport) it have to make 1 command per collection, here are the commands, maybe it is usefull for someone with the similar issues.

Collection from v2.4 (i can’t see on v2.0.3)

Collections:

alarmcallbackconfigurations
alarmcallbackhistory
alerts
cluster_config
cluster_events
collectors
content_packs
grok_patterns
index_failures
index_ranges
index_sets
lut_caches
lut_data_adapters
lut_tables
nodes
notifications
pipeline_processor_pipelines
pipeline_processor_pipelines_streams
pipeline_processor_rules
roles
sessions
streamrules
streams
system_messages
traffic
users

Graylog Server 2.0.3:
mongoexport -d graylog -c collectionName -o /home/ubuntu/mongoExport/collectionName.json

scp -r user@x.x.x.x:/home/ubuntu/mongoExport/ /home/user/mongoExport

Graylog Server 2.4:
mongoimport --drop -d graylog -c collectionName --file collectionName.json

Rapidly i found Alerts in the new server is empty, maybe is handler diferent i gonna check more granularity.

Thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.