Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool is unable to identify service account that i created on Grafana server as well as AWS managed grafana. #30

Open
parth741 opened this issue Jun 18, 2024 · 4 comments
Labels
question Further information is requested

Comments

@parth741
Copy link

As per the usage document of amazon-managed-grafana-migrator I am able to identify the AWS managed garafana via
#amazon-managed-grafana-migrator discover --region us-west-2

I have also created service account with below command-
#aws grafana create-workspace-service-account --workspace-id g-abcdef5678
--grafana-role ADMIN
--name grafana_migration

As soon as i execute migrate command i get below error-

Skipping API key creation for https://*****.com/

Creating service account token for service account grafana_migration

error: ValidationException: Invalid Service Account id: grafana_migration
{
RespMetadata: {
StatusCode: 400,
RequestID: "df3d54ae-d0e8-4509-b137-42c2668e3583"
},
Message_: "Invalid Service Account id: grafana_migration"
}

Migration command that am using is-
#amazon-managed-grafana-migrator migrate --src-url https://***.com/ --src-api-key glsa_T**************** --dst g-.grafana-workspace.us-west-2.amazonaws.com --dst-service-account-id grafana_migration

I have a question too, does this tool migrates the datasources configured passwords from source?

@parth741 parth741 added the question Further information is requested label Jun 18, 2024
@parth741 parth741 changed the title Tool is unable to identiy service account that i created on Grafana server as well as AWS managed grafana. Tool is unable to identify service account that i created on Grafana server as well as AWS managed grafana. Jun 18, 2024
@parth741
Copy link
Author

@bonclay7 does migration tool migrates the configured password of data sources from grafana server to AWS managed grafana?

@serkanh
Copy link

serkanh commented Jul 11, 2024

@parth741 Which version are you migrating from, and to which version? If you're using version 8, you should first upgrade or migrate to Grafana version 9 instance. After successfully migrating to version 9, proceed with the upgrade to version 10. Please note that the commands differ slightly at each step.

@parth741
Copy link
Author

parth741 commented Jul 11, 2024 via email

@carlosrodgut
Copy link

carlosrodgut commented Jan 22, 2025

Hi @parth741,

Surely you already have found out the cause of the issue but just in case.

The value for --dst-service-account-id is a number assigned to the Service Account as ID.

aws grafana list-workspace-service-accounts --workspace-id <WORKSPACE_ID>

{
    "serviceAccounts": [
        [...]
        {
            "grafanaRole": "Admin",
            "id": "<ID>",
            "isDisabled": "false",
            "name": "grafana_migration"
        }
    ],
    "workspaceId": "<WORKSPACE_ID>"
}

The migration from a Grafana Server instance to Amazon Managed Grafana workspace can be performed this way:

amazon-managed-grafana-migrator migrate \
--src-url ${GRAFANA_SRC_URL} \
--src-api-key ${GRAFANA_SRC_API_KEY} \
--dst ${WORKSPACE_ID}.grafana-workspace.${AWS_REGION}.amazonaws.com \
--dst-service-account-id <ID>

Skipping API key creation for <GRAFANA_SRC_URL>

Creating service account token for service account <ID>

Migrating data sources:
[...]
✔ Migrated 60 data sources

Migrating folders:
[...]
✔ Migrated 75 folders

Migrating dashboards:
[..]
✔ Migrated 894 dashboards

Skipping alert rules migration

Removing service account token for service account <ID>

Best Regards,
Carlos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants