30 Oct 2022 07:41 AM
Output from cmd : "monaco --environments=environments.yaml -p=auto-tagging"
2022-10-30 12:55:32 INFO Dynatrace Monitoring as Code v1.8.5
2022-10-30 12:55:32 INFO Executing projects in this order:
2022-10-30 12:55:32 INFO 1: auto-tagging (0 configs)
2022-10-30 12:55:32 INFO Processing environment test1...
2022-10-30 12:55:32 INFO Deployment summary:
2022-10-30 12:55:32 ERROR Deployment to test1 failed with error!
2022-10-30 12:55:32 ERROR environment variable Monaco_Test not found
2022-10-30 12:55:32 ERROR errors during deployment! Check log
This is my environments.yaml file:
Can anyone please guide me how to set the token in environments.yaml file, am I doing it correctly? I have created the token in Saas with required permissions.
Solved! Go to Solution.
30 Oct 2022 09:21 AM
Hi @Sahil2308
You need to add the token to your system as environment variable as explained in the documentation
HTH
Yos
30 Oct 2022 09:40 AM - edited 30 Oct 2022 09:42 AM
Hi @Yosi_Neuman ,
Yes I did mention the API token name in environments.yaml file.
This is my environments.yaml file:
Here "Monaco_Test" is my API token name created in Dynatrace
Do I need to specify the value itself somewhere in yaml?
30 Oct 2022 10:55 AM
Hi @Sahil2308
You need to add the token name and value in your system environment variable settings
HTH
Yos
30 Oct 2022 12:53 PM
Hi @Yosi_Neuman ,
Thanks for the help, this indeed resolved my issue 🙂 . I am using Ubuntu so I hve set the env in /etc/environment file.
I have run the cmd: "monaco -e=environments.yaml -p=auto-tag1"
o/p:
You are currently using the old CLI structure which will be used by
default until monaco version 2.0.0
Check out the beta of the new CLI by adding the environment variable
"NEW_CLI".
We can't wait for your feedback.
2022-10-30 18:17:14 INFO Dynatrace Monitoring as Code v1.8.5
2022-10-30 18:17:15 INFO Executing projects in this order:
2022-10-30 18:17:15 INFO 1: auto-tag1 (0 configs)
2022-10-30 18:17:15 INFO Processing environment test1...
2022-10-30 18:17:15 INFO Processing project auto-tag1...
2022-10-30 18:17:15 INFO Deployment summary:
2022-10-30 18:17:15 INFO Deployment finished without errors
2022-10-30 18:17:15 INFO There is no delete file delete.yaml found in delete.yaml. Skipping delete config.
But I cannot see the changes(creation of auto-tagging rule) in Tenant.
This is my file dir:
root@sahil-VirtualBox:/opt/monacoDir1# tree .
.
├── auto-tag1
│ ├── auto-tag.yaml
│ └── Host-Group-Name.json
├── environments.yaml
├── monaco
└── README.md
contents of auto-tag.yaml file:
01 Nov 2022 05:59 AM
Hey, thanks for the help, got the issue resolved. 😊