NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
176 stars 95 forks source link

Migraging NCPA Configs When Upgrading from NCPA 2.X to 3.X on WIndows #1097

Closed shoreypu closed 1 month ago

shoreypu commented 5 months ago

When attempting to upgrade from NCPA 2.4 to 3.0.1 in Windows, the new agent no longer has any of the config files from the old agent. NCPA 2.X is 32-bit and installs to C:\Program Files (x86)... and 3.x is 64-bit and installs to C:\Program Files... The config from C:\Program Files (x86)... is not copied over to C:\Program Files....

Is there a way to copy over the config files as part of the upgrade?

Thanks

bramassendorp commented 5 months ago

Noticed this also, and besides that, the local plugins are also not migrated.

From: shoreypu @.> Sent: Wednesday, January 24, 2024 3:20 PM To: NagiosEnterprises/ncpa @.> Cc: Subscribed @.***> Subject: [NagiosEnterprises/ncpa] Migraging NCPA Configs When Upgrading from NCPA 2.X to 3.X on WIndows (Issue #1097)

When attempting to upgrade from NCPA 2.4 to 3.0.1 in Windows, the new agent no longer has any of the config files from the old agent. NCPA 2.X is 32-bit and installs to C:\Program Files (x86)... and 3.x is 64-bit and installs to C:\Program Files... The config from C:\Program Files (x86)... is not copied over to C:\Program Files....

Is there a way to copy over the config files as part of the upgrade?

Thanks

— Reply to this email directly, view it on GitHubhttps://github.com/NagiosEnterprises/ncpa/issues/1097, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIPKUU25JTMBO5CYNJTDJCLYQEKBTAVCNFSM6AAAAABCI26AKSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA4TQMZXGUYDGNY. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

shoreypu commented 5 months ago

I kind of implied that with config files, but probably should have spelled that out as well. Basically, this is a new, un-configured, agent.

MrPippin66 commented 5 months ago

I would agree this is a pretty serious problem. We've yet to deploy/upgrade from V2 to V3 for Windows and this will cause a lot of headaches.

shoreypu commented 5 months ago

I would agree this is a pretty serious problem. We've yet to deploy/upgrade from V2 to V3 for Windows and this will cause a lot of headaches.

I've run some tests and it looks like you can copy over the files prior to upgrading, which will not be overwritten. However, I also noticed some differences in the ncpa.cfg files, that I am still reviewing. The standard set of NCPA checks we run work, but I'm not sure if there are any caveats to running with the old config. Guidance would definitely be helpful.

MrPippin66 commented 4 months ago

Regardless, there should be an "upgrade" part of the installation that detects a 32-bit previous installation which does all the requisite migration steps.

ne-bbahn commented 4 months ago

I need to verify that there are no differences in configuration that would cause things to break if someone upgrades, but as long as that's not an issue, I'll have the NSIS script copy over the old configs to the new location.

MrPippin66 commented 4 months ago

Okay, but just to be clear, that really should be the entire current contents of the existing 32bit location (minus the files the upgrade would installing)

ne-bbahn commented 4 months ago

Okay, but just to be clear, that really should be the entire current contents of the existing 32bit location (minus the files the upgrade would installing)

I believe it should copy the contents of the etc, plugins and var folders. If you think anything else should be copied over, let me know.

MrPippin66 commented 4 months ago

In my case, if you get etc and plugins, we're good. var matters for the existing db


From: bb @.> Sent: Wednesday, February 28, 2024 2:02 PM To: NagiosEnterprises/ncpa @.> Cc: SCOTT FIELDS @.>; Comment @.> Subject: [EXTERNAL] Re: [NagiosEnterprises/ncpa] Migraging NCPA Configs When Upgrading from NCPA 2.X to 3.X on WIndows (Issue #1097)

Okay, but just to be clear, that really should be the entire current contents of the existing 32bit location (minus the files the upgrade would installing) I believe it should copy the contents of the etc, plugins and var folders. If you think ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. https://us-phishalarm-ewt.proofpoint.com/EWT/v1/Dq81_Y1A2Q!eXOKWoFBzM6hVy3hqwp6o30LxmCd-Xi9sP2gh_g3V17-jCyvkeKb61ROG32wrqVseVvSKtRpDBcrkY2ckTYsbPDzxrd3O3Be2iJtUHD8V_c8Q_AyVl4$ Report Suspicious

ZjQcmQRYFpfptBannerEnd

Okay, but just to be clear, that really should be the entire current contents of the existing 32bit location (minus the files the upgrade would installing)

I believe it should copy the contents of the etc, plugins and var folders. If you think anything else should be copied over, let me know.

— Reply to this email directly, view it on GitHubhttps://github.com/NagiosEnterprises/ncpa/issues/1097#issuecomment-1969740626, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMAJ6I3XLCD7ABXPNGDGDGTYV6EL3AVCNFSM6AAAAABCI26AKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRZG42DANRSGY. You are receiving this because you commented.Message ID: @.***>

ne-bbahn commented 3 months ago

This will be included in NCPA 3.1.0

MrPippin66 commented 3 months ago

And tentative schedule for this release?