Agent Client Collector (ACC) - API Key change - Encryption

xbr
Tera Contributor

Hello Community,

 

so i want to update the API Key in the acc.yml on our ACC service, as they can expire.
I already created a new API Key on [mid_webserver_api_key_credentials]. I can view the API Key.
But this is not an encrypted API Key, which i need to put into the acc.yml files parameter, api-key: "encrypted:<API_KEY>". 
As i understand this is done when installing the ACC, as it asks for the API Key (MID Server API Key) in the setup.

Is there any Instance module where i can do that? Is there a script, "encrypt.bat", somwhere, which i couldn't find?

I could not find any documentation on how to change the API Key on an already installed ACC. 
So i ask for your help. How can i do that, where to find the documentation for it!
Or do I need to create an API key that does not expire and reinstall the ACC?

Thank you for your responses in advance. 

1 ACCEPTED SOLUTION

Doci1
Kilo Sage

You dont need the encrypted API key. Just paste it as you see it in the intance to acc.yml file and restart the ACC service. After restart you will see encrypted API Key.

View solution in original post

5 REPLIES 5

Thank you @Doci1 for your reply, There is no log that I could see even the ECC input logs are not giving sufficient information, I even restarted the ACC services from the Servers, but could not see any change... restarting this agent from the ServiceNow Agent console is not possible as there is no data that is being collected. 

 

Now the last option is to uninstall ACC agent and reinstall it or check the API key once again in the acc.yml file 

@xbr : You can put the api key just like as mentioned below and once you restart the service it will pick up the entire charac codes.

  1. Ensure that the acc.yml file doesn’t include an encrypted API key.
    For example: api-key: "<insert plain text API key here>"

 

OR at the latest thinking about following these steps

 

  • Stop the Agent Client Collector service
  • Open the cache folder.
    • Windows: C:\ProgramData\ServiceNow\agent-client-collector\cache
  • Keep agent_now_id, but remove assets.db, queue.db and all sub-directories
  • Start the Agent Client Collector service

 

Help if you have any other options to check.