How to export Collector Sidecar Configurations

Hallo,

from a QA Graylog Cluster I want to export a number of Collector Sidecar Configurations (what you define in System -> Collctors -> Manage Configurations) to file and import it again on another Graylog cluster.
This is possible with via “content Packs” with streams, dashboards, inputs and so on.

But how can I export and import those Collector Sidecar Configurations. Even in the API- browser I couldn’t find it, that means what I found (/plugins/org.graylog.plugins.collector/collectors/collectors) did not work. The output is empty, but there are about 15 configurations defined.

Is there a way to achieve this?

Regards,

Dietmar Schurr

You’ll have to export the respective collections from Graylog’s MongoDB database (e. g. using mongodump) and import them in the MongoDB database of the new environment.

Hallo Jochen,

thank a lot. I could export the collection collectors with
mongodump --host alt1:27017 -d graylog -c collectors -o /home/user1/
and restore with:
mongorestore -u graylog -p pwd --host neu1:27017 -d graylog -c collectors /home/user1/graylog/collectors.bson
I can find the configurations in the new cluster but they are labeled as “inactive”. How can they be activated?

Thanks in advance,

Dietmar Schurr

Hallo,

now the collector configuration is active. I simply had to modify the collector_sidecar.yml file on the client side. The file should point to the new cluster IP.

Ok. so the problem is solved.

Thanks you Jochen!

Hi Dietmar,
you copied the wrong collection. The sidecar configurations are stored in collector_configurations. The running sidecars are hold in collectors.

Hope that helps,
Marius

Hallo Marius,

ok, but I can not find the collection collector_configuration:
rs_graylog:PRIMARY> show collections
alarmcallbackconfigurations
alarmcallbackhistory
alerts
archive_backends
archive_catalog
audit_log
cluster_config
cluster_events
collectors
content_packs
grok_patterns
index_failures
index_ranges
index_sets
inputs
ldap_settings
licenses
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
users
rs_graylog:PRIMARY>

Is this collection somehow hidden?

Regards,
Dietmar Schurr

If there is a Sidecar configuration with inputs/outputs/… there must be a collection by that name. Maybe you are looking at the wrong cluster?

Of course, you are right. I was looking into the wrong MongoDB.
Does it make sense to dump and import also the collection collector_actions?

Regards,

Dietmar Schurr

Ok, now I dumped and restored the collections **collector_actions** and collector-configurations.

And now, all the required Collector Configurations are available in the new cluster.
Great!

Thanks.

Dietmar Schurr

The actions collection should be empty and it’s not necessary to copy it.

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