Question

2 answers to this question

Recommended Posts

  • 0
  • Administrators

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.

Link to post
Share on other sites
  • 0

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 :) ) 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", },
);

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.