Re: Is it possible to change a nodes Foreign ID?

JohnD Blackburn <[email protected]>
Newsgroups gmane.network.opennms.general
Message-ID <DB6PR0602MB2902D8C0DF8569AC833DBC22CB7A0@DB6PR0602MB2902.eurprd06.prod.outlook.com>
I've been poking around in the postgres database, and have found that the NODE table has a column for foreignid.

Is that the only reference in the database to foreignid?  That is, it is not a foreign key column?

If so, the following statement should correct my foreign ID's?

update node
set foreignid=nodelabel
where foreignsource is not null
and foreignid != nodelabel
;


And then a restart of OpenNMS for good measure?

Regards,
John







From: JohnD Blackburn [mailto:[email protected]]
Sent: Monday, 25 September 2017 2:35 PM
To: General OpenNMS Discussion <[email protected]>
Subject: [opennms-discuss] Is it possible to change a nodes Foreign ID?


Hi All,

We had a bunch of nodes that due to a misunderstanding of how to configure Provisioning Requisitions, were created with an auto-generated Foreign ID, rather than the real foreign ID from the foreign source.

Is there an easy way to update the Foreign ID of these nodes without having to delete and re-add these nodes?

The foreign ID should have been the same as the node label, and now that we can specify foreignSource/foreignID as parameters to send-event.pl, we can't actually make use of those parameters, due to the foreign ID being incorrect.

(even a bunch of SQL statements I could throw at the postgresql database would be handy - this is a one off change I would be making, as we are fixing the Provisioning process to correctly set the Foreign ID.)

Regards,
John

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.