ChrisYounger / config_explorer

Config viewer and file editor for Splunk. Based on VSCode.
GNU Affero General Public License v3.0
28 stars 7 forks source link

Ability to choose deployment server class #22

Closed ghost closed 2 years ago

ghost commented 2 years ago

Having a "reload deploy-server" action is real cool, but it would be even cooler to have a dropdown button available to choose from configured server classes, so the entire deployment-server isn't reloaded.

ChrisYounger commented 2 years ago

Hi Mike, thanks for the suggestion. I have added this feature to Config Explorer. Download version 1.5.11 from here: https://splunkbase.splunk.com/app/4353/ and let me know how you go.

ghost commented 2 years ago

Thanks, but unfortunately, after an upgrade to 1.5.11, even after a restart of the server, there's no option in the right-click menu of a file in explorer for a deploy action, just: save file reload from disk save and debug/refresh conf-inputs debug/refresh conf-inputs open inputs.conf.spec change all occurences cut copy set post-save action preferences command palette

I checked in preferences & set post-save action, but I don't see it there either. THis is in an app in deployment apps on a deployment server. However, I'm not sure if this functionality will work. Doing a reload against an app/file will reload all server classes w/ that app. We're hoping to only reload the deployment server for a particular server class.

Thanks again

ChrisYounger commented 2 years ago

Hi Mike, the option will only show up when you right-click on a folder or subfolder underneath the deployment-apps folder.

image

If you dont see this option, try hitting CTRL-F5 to reload config explorer without using the browser cache and then you should see it.

Hope this helps, let me know if it still doesn't show up.

ghost commented 2 years ago

That did it, thank you sir! We’ll test out this functionality. It may do exactly what we need.

From: Chris Younger @.> Sent: Monday, February 28, 2022 1:47 PM To: ChrisYounger/config_explorer @.> Cc: Mike Anderson - Threat & Vul. @.>; Author @.> Subject: [External] Re: [ChrisYounger/config_explorer] Ability to choose deployment server class (Issue #22)

Hi Mike, the option will only show up when you right-click on a folder or subfolder underneath the deployment-apps folder.

[image]https://urldefense.com/v3/__https:/user-images.githubusercontent.com/1431861/156040463-54ac0e75-234c-496b-a70c-6e3277b69b99.png__;!!MjIf2fY!yyB9FEZxEvt_iNUwU_q2h2Skr_a2J_3cOEb3Dm7-GMK12_luFb9FX7Wzvkj7oZLj$

If you dont see this option, try hitting CTRL-F5 to reload config explorer without using the browser cache and then you should see it.

Hope this helps, let me know if it still doesn't show up.

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/ChrisYounger/config_explorer/issues/22*issuecomment-1054557460__;Iw!!MjIf2fY!yyB9FEZxEvt_iNUwU_q2h2Skr_a2J_3cOEb3Dm7-GMK12_luFb9FX7WzvkhX5fV9$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AUCMGI5465VHVVEG2UFTTO3U5UIDJANCNFSM5PHRBRLQ__;!!MjIf2fY!yyB9FEZxEvt_iNUwU_q2h2Skr_a2J_3cOEb3Dm7-GMK12_luFb9FX7WzvvGGgO-V$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https:/apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!MjIf2fY!yyB9FEZxEvt_iNUwU_q2h2Skr_a2J_3cOEb3Dm7-GMK12_luFb9FX7WzvisTaXMC$ or Androidhttps://urldefense.com/v3/__https:/play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!MjIf2fY!yyB9FEZxEvt_iNUwU_q2h2Skr_a2J_3cOEb3Dm7-GMK12_luFb9FX7WzvsCnW2lT$. You are receiving this because you authored the thread.Message ID: @.**@.>>


CAUTION: This email originated outside of Aflac. Do not click links or open attachments unless you recognize the sender and know the contents are safe.


Confidentiality Notice: This e-mail and any attachments may contain confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, any distribution, copying, or use of this e-mail or its attachments is prohibited. If you received this message in error, please notify the sender immediately by e-mail and delete this message and any copies. Thank you.

ChrisYounger commented 2 years ago

Glad to hear it! Did you need to do the CTRL-F5 to get it to show up?

ghost commented 2 years ago

I had to do the ctrl-f5. And I see what you’re trying to do, allow it to reload a certain server class after right-clicking the dir. However, it displays 30 (out of 108) of our server classes and “all server classes” selection. When I choose one of the server classes to reload, it reloads the whole deployment server.

From: Chris Younger @.> Sent: Monday, February 28, 2022 1:58 PM To: ChrisYounger/config_explorer @.> Cc: Mike Anderson - Threat & Vul. @.>; Author @.> Subject: [External] Re: [ChrisYounger/config_explorer] Ability to choose deployment server class (Issue #22)

Glad to hear it! Did you need to do the CTRL-F5 to get it to show up?

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/ChrisYounger/config_explorer/issues/22*issuecomment-1054565211__;Iw!!MjIf2fY!3usf92Opj48EnqWMf5yHXeDTjq5BAh35AZdHwtc18Z7R6k2n3kOMZGaV8sJQWNH_$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AUCMGI2TXAUCS2HNVARK34TU5UJL7ANCNFSM5PHRBRLQ__;!!MjIf2fY!3usf92Opj48EnqWMf5yHXeDTjq5BAh35AZdHwtc18Z7R6k2n3kOMZGaV8va8bGlS$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https:/apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!MjIf2fY!3usf92Opj48EnqWMf5yHXeDTjq5BAh35AZdHwtc18Z7R6k2n3kOMZGaV8jIsgkbu$ or Androidhttps://urldefense.com/v3/__https:/play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!MjIf2fY!3usf92Opj48EnqWMf5yHXeDTjq5BAh35AZdHwtc18Z7R6k2n3kOMZGaV8tmXLYnq$. You are receiving this because you authored the thread.Message ID: @.**@.>>


CAUTION: This email originated outside of Aflac. Do not click links or open attachments unless you recognize the sender and know the contents are safe.


Confidentiality Notice: This e-mail and any attachments may contain confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, any distribution, copying, or use of this e-mail or its attachments is prohibited. If you received this message in error, please notify the sender immediately by e-mail and delete this message and any copies. Thank you.

ChrisYounger commented 2 years ago

Hmm ok. thanks for the feedback.

  1. Ill try recreate the problem in my environment where only 30 items show up.
  2. Config Explorer runs the command ./bin/splunk reload deploy-server -class "serverclass_name" when you select one. How do you know this is not working properly (so that I can test it)?
ghost commented 2 years ago

These showed up in the logs: 02-28-2022 13:57:09.118 -0500 INFO DeploymentServer [5641 TcpChannelThread] - Attempting to reload entire DS; reason='REST-requested reload' Audit:[timestamp=02-28-2022 13:57:09.100, user=e16247, action=list_deployment_server, info=granted object="_reload" operation=_reload]

And then all of my server classes started reloading :(

From: Chris Younger @.> Sent: Monday, February 28, 2022 2:08 PM To: ChrisYounger/config_explorer @.> Cc: Mike Anderson - Threat & Vul. @.>; Author @.> Subject: [External] Re: [ChrisYounger/config_explorer] Ability to choose deployment server class (Issue #22)

Hmm ok. thanks for the feedback.

  1. Ill try recreate the problem in my environment where only 30 items show up.
  2. Config Explorer runs the command ./bin/splunk reload deploy-server -class "serverclass_name" when you select one. How do you know this is not working properly (so that I can test it)?

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/ChrisYounger/config_explorer/issues/22*issuecomment-1054573089__;Iw!!MjIf2fY!y1ZpbaEDJsQ0hs0bKWTXxakS7-_BGq7xH4aJCCYdPFvywklxiMXwUk6eyn42Q1sW$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AUCMGIYWXTSVSVCEVRWKVQTU5UKRVANCNFSM5PHRBRLQ__;!!MjIf2fY!y1ZpbaEDJsQ0hs0bKWTXxakS7-_BGq7xH4aJCCYdPFvywklxiMXwUk6eyvFnIwcY$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https:/apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!MjIf2fY!y1ZpbaEDJsQ0hs0bKWTXxakS7-_BGq7xH4aJCCYdPFvywklxiMXwUk6eyn6dniSj$ or Androidhttps://urldefense.com/v3/__https:/play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!MjIf2fY!y1ZpbaEDJsQ0hs0bKWTXxakS7-_BGq7xH4aJCCYdPFvywklxiMXwUk6eysYU7e6Z$. You are receiving this because you authored the thread.Message ID: @.**@.>>


CAUTION: This email originated outside of Aflac. Do not click links or open attachments unless you recognize the sender and know the contents are safe.


Confidentiality Notice: This e-mail and any attachments may contain confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, any distribution, copying, or use of this e-mail or its attachments is prohibited. If you received this message in error, please notify the sender immediately by e-mail and delete this message and any copies. Thank you.

ChrisYounger commented 2 years ago

OK Thanks Mike, I appreciate your assistance. I have fixed both the issues you have reported in 8e7b7312bea95f9f6f982db9caba4350ca8fadde and uploaded a new version to Splunkbase as version 1.5.12

When you deploy this new version you will need to restart Splunk or manually kill the processes /opt/splunk/bin/python3.7 /opt/splunk/lib/python3.7/site-packages/splunk/persistconn/appserver.py otherwise a full reload will occur (even though you will notice all the server classes show up).

ghost commented 2 years ago

Chris, it’s working now. Thanks very much for your help.

And I appreciate your efforts in this application. It’s a huge help for us.

From: Chris Younger @.> Sent: Monday, February 28, 2022 2:32 PM To: ChrisYounger/config_explorer @.> Cc: Mike Anderson - Threat & Vul. @.>; Author @.> Subject: [External] Re: [ChrisYounger/config_explorer] Ability to choose deployment server class (Issue #22)

OK Thanks Mike, I appreciate your assistance. I have fixed both the issues you have reported in 8e7b731https://urldefense.com/v3/__https:/github.com/ChrisYounger/config_explorer/commit/8e7b7312bea95f9f6f982db9caba4350ca8fadde__;!!MjIf2fY!zCJxSYzCtQu054Bs7C0Hz2sa2vAC5dosywZ-q2RszWQJvsYq_PbxXxuWjs0CBQqn$ and uploaded a new version to Splunkbase as version 1.5.12

When you deploy this new version you will need to restart Splunk or manually kill the processes /opt/splunk/bin/python3.7 /opt/splunk/lib/python3.7/site-packages/splunk/persistconn/appserver.py otherwise a full reload will occur (even though you will notice all the server classes show up).

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/ChrisYounger/config_explorer/issues/22*issuecomment-1054591987__;Iw!!MjIf2fY!zCJxSYzCtQu054Bs7C0Hz2sa2vAC5dosywZ-q2RszWQJvsYq_PbxXxuWjtWqsqbe$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AUCMGI322NWH4NXWKBDIBE3U5UNKLANCNFSM5PHRBRLQ__;!!MjIf2fY!zCJxSYzCtQu054Bs7C0Hz2sa2vAC5dosywZ-q2RszWQJvsYq_PbxXxuWjqJOazl4$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.com/v3/__https:/apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!MjIf2fY!zCJxSYzCtQu054Bs7C0Hz2sa2vAC5dosywZ-q2RszWQJvsYq_PbxXxuWjnaX85CM$ or Androidhttps://urldefense.com/v3/__https:/play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!MjIf2fY!zCJxSYzCtQu054Bs7C0Hz2sa2vAC5dosywZ-q2RszWQJvsYq_PbxXxuWjhEwbnJU$. You are receiving this because you authored the thread.Message ID: @.**@.>>


CAUTION: This email originated outside of Aflac. Do not click links or open attachments unless you recognize the sender and know the contents are safe.


Confidentiality Notice: This e-mail and any attachments may contain confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, any distribution, copying, or use of this e-mail or its attachments is prohibited. If you received this message in error, please notify the sender immediately by e-mail and delete this message and any copies. Thank you.

ChrisYounger commented 2 years ago

Awesome, glad to hear it 👍