5 years ago
Configsources search
Hello,
Is there a way to search configsources from and external device (another server).
Is there a way to export configsources?
Hello,
Is there a way to search configsources from and external device (another server).
Is there a way to export configsources?
Do you mean can a ConfigSource retrieve the config from a device that is not the collector? Yes. The ConfigSource should be written that way.
Are you asking if you can export the config or the ConfigSource?
Yes, you can export LogicModules, including ConfigSources. Go to Settings>>ConfigSources>>Navigate to the ConfigSource you want to export. Click "More" at the top and click Export. You'll get the XML definition that can be imported into another LM portal.
Yes, you can export the retrieved config. Navigate to the device in the Resource tree, find the ConfigSource, select the instance. On the "Configs" tab, you'll see the config that has been pulled back and there's a "Download" option.
We export pretty much everything regularly via the API and check into a git repo. This allows us to track changes (always fun to find LM devs testing module changes :)/emoticons/smile@2x.png 2x" title=":)" width="20"> ) and more importantly, allows us to grep for things in modules. Among other things, this simplifies finding code examples for starting points on new modules. Our export/backup module does have per endpoint filters since we have found a number of fields that are ephemeral (e.g., timestamps) and must be suppressed to avoid checkin thrashing. Our current export list includes the following. There are a few other features in this, like grouping by client using a client property, saving items one per file and special formatting options to allow the results to be accessible (default output for Groovy code is one long line, making diffs painful).
I could be convinced to share this one, but if you just need one thing like configsources, a specific API script for that may be easier.
Regards,
Mark
my %BACKUPLIST = (
"/setting/alert/chains" => { file => "escalation-chains",
filter => \&filter_escalation_chains,
},
"/setting/alert/rules" => { file => "alert-rules",
filter => \&filter_alert_rules,
},
"/setting/alert/dependencyrules" => { file => "alert-dependencyrules",
# filter => \&filter_alert_dependencyrules,
},
"/setting/admins" => { file => "users",
filter => \&filter_users,
},
"/setting/admin/groups" => { file => "user-groups", },
"/setting/datasources" => { file => "datasources",
## metadata => "/setting/registry/metadata/datasource", # no way to get this info currently
saveoptions => { mode => "oneperfile", format => "dumper" },
},
"/setting/batchjobs" => { file => "jobmonitors", },
"/setting/eventsources" => { file => "eventsources",
saveoptions => { mode => "oneperfile", },
},
"/setting/configsources" => { file => "configsources",
saveoptions => { mode => "oneperfile", format => "dumper" },
},
"/setting/propertyrules" => { file => "propertysources",
saveoptions => { mode => "oneperfile", format => "dumper" },
},
"/setting/topologysources" => { file => "topologysources",
saveoptions => { mode => "oneperfile", format => "dumper" },
},
"/setting/functions" => { file => "appliesto-functions", },
"/setting/oids" => { file => "sysoid-maps", },
"/setting/roles" => { file => "roles", },
"/setting/role/groups" => { file => "role-groups", },
"/setting/recipientgroups" => { file => "recipient-groups", },
"/setting/integrations" => { file => "integrations", },
"/setting/netscans/groups" => { file => "netscan-groups", },
"backup_netscan_policies" => { file => "netscan-policies",
backup => \&backup_netscan_policies,
filter => \&filter_netscan_policies,
},
"/setting/collectors" => { file => "collectors",
filter => \&filter_collectors,
},
"/dashboard/dashboards" => { file => "dashboards", },
"/dashboard/widgets" => { file => "widgets", },
"/dashboard/groups" => { file => "dashboard-groups", },
"/device/devices" => { file => "devices",
groupby => $CLIENTPROP,
filter => \&filter_devices,
},
"/device/groups" => { file => "device-groups",
backup => \&backup_device_groups,
groupby => $CLIENTPROP,
filter => \&filter_device_groups,
},
"/service/services" => { file => "services",
groupby => $CLIENTPROP,
filter => \&filter_services,
},
"/service/groups" => { file => "service-groups",
groupby => $CLIENTPROP,
filter => \&filter_service_groups,
},
"/report/reports" => { file => "reports",
filter => \&filter_reports,
saveoptions => { mode => "oneperfile", nameformat => '%name%.%groupId%', },
},
"/report/groups" => { file => "reports-groups", },
);