I am working on a cookbook ec2config which installs and configure Ec2services , i have created a template where we need to overwrite hostname, ip, fqdn and Ec2InstanceID
i could able to overwrite IP, Hostname, FQDN by declaring the variable as below but couldnot able to pull the instanceID value. Is there any specific attribute provided where i can get the information of InstanceID i have tried all possible ways to get the instanceid but couldnt able to figure it out . Please help
“<%= node[:“ipaddress”] %>” works
"<%= node[:“hostname”] %>" works
"<%= node[:“fqdn”] %>" works
"<%= node[:“InstanceID”] %>" not working
@Galen thank you for knife info but i knew about knife -ohai utility where i can pull the information .
But here in my case im trying to overwrite the values in a xml config file where we need to give IP,Hostname,fqdn and InstanceID as inputs i could able to give ip, hostname,fqdn as inputs except InstanceID value of the node
Below is the metrics in which we need to give the dimension name and values as input
{
“Id”: “PerformanceCounter2”,
“FullName”: “AWS.EC2.Windows.CloudWatch.PerformanceCounterComponent.PerformanceCounterInputComponent,AWS.EC2.Windows.CloudWatch”,
“Parameters”: {
“CategoryName”: “Memory”,
“CounterName”: “% Committed Bytes In Use”,
“InstanceName”: “”,
“MetricName”: “MemoryUsed”,
“Unit”: “Percent”,
“DimensionName”: “InstanceId”,
“DimensionValue”: " ",
“DimensionName”: “Ipaddress”,
“DimensionValue” : “xxxxxx”,
“DimensionName”: “hostname”
“DimensionValue”: “xxxxxx”,
“DimensionName”: “fqdn”,
“DimensionValue”: “xxxx”,
}
I believe this info would be more specific to you , please help