Can zone and zonegroups have the same name CEPH 5 - amazon-s3

I'm currently creating a new ceph cluster, and I was wondering, can a zone and its zonegroup share the same name ?
Like this:
Realm: GOLD
Zonegroup: eu-east-1
Zone: eu-east-1
Realm: Silver-1
Zonegroup: eu-east-2
Zone: eu-east-2
Realm: Silver-2
Zonegroup: eu-east-3
Zone: eu-east-3
Thanks in advance

Related

Metricbeat gcp module to capture bigquery metrics is not working as expected

I have added bigquery metrics configuration in modules.d/gcp.yml file
But getting an error below
"2021-12-06T09:51:10.206Z ERROR [gcp.metrics] metrics/metricset.go:294 bigquery.googleapis.com/storage/table_count" metric descriptor is empty, this metric will not be collected
Below is the code which I have used
module: gcp
region: "us-central1"
metricsets:
metrics
project_id: "ProjectName"
credentials_file_path: "/root/xyz.json"
exclude_labels: false
period: 1h
metrics:
aligner: ALIGN_NONE
service: bigquery
service_metric_prefix: bigquery.googleapis.com/
metric_types:
"bigquery.googleapis.com/storage/table_count"
Let me know if there is any changes needed in code.
I have also tried extracting compute and billing metrics . We can see the column names populating in Kibana discovery filter area , but we do not have any data available
Please find the code given below
module: gcp
region: "us-central1"
metricsets:
metrics
project_id: "projectname"
credentials_file_path: "/root/xyz.json"
exclude_labels: false
period: 1
metrics:
aligner: ALIGN_NONE
service: compute
metric_types:
"instance/cpu/reserved_cores"
"instance/cpu/usage_time"
"instance/cpu/utilization"
"instance/uptime"
Thanks
The code below is worked well for me.
- module: gcp
metricsets:
- metrics
project_id: "YOUR_PROJECT_ID"
credentials_file_path: "your JSON credentials file path"
exclude_labels: false
period: 1800s # 1800s is recommended
metrics:
- aligner: ALIGN_NONE
service: bigquery
service_metric_prefix: bigquery.googleapis.com/ # This is not required as already "bigquery.googleapis.com/" is default value
metric_types:
- "storage/table_count" #only "storage/table_count" here
It seems that you should edit your metric_type attribute only.
I recommend the collection period of table_count metric to 1800s as GCP sampled this every 1800 seconds.
Refer here for the information about that.
This works well at my kibana too.

celery the timezone not same the backend redis

I already set celery4.4 config timezone is "Asia/Shanghai"
CELERY_TIMEZONE = "Asia/Shanghai"
And the terminal show now datetime.
2021-08-20 23:26:03,849
But the backend I use redis date_zone is not the same as the datetime now.
"date_done": "2021-08-20T15:26:03.848352"
I dont know where my config is wrong.
Currently as documented, the resulting date_done isn't based on the configured Celery timezone but rather is just always UTC. That is why you are seeing 15:26 (UTC) instead of 23:26 (UTC+8).
https://docs.celeryproject.org/en/stable/reference/celery.result.html#celery.result.AsyncResult.date_done
https://docs.celeryproject.org/en/stable/internals/reference/celery.backends.database.models.html
property date_done
UTC date and time.
This feature has already been requested before but seems to be always de-prioritized and moved for next release. Currently, it is planned to be included in Celery 5.2.
The celery result column, date_done is utc, even though you set the timezone

How to set time zone to frecnh zone + windows ce

I need to set my timezone in my mobile device to french zone in c# (windows embedded ce)
how can I do this please?
You can use this library to ease your development: https://opennetcf.codeplex.com/
I'm using it and setting the time zone through the following objects: TimeZoneCollection, TimeZoneInformation, DateTimeHelper.
You can not set the TimeZone to a city/location, you can only set the DST data.
See my post here: http://community.intermec.com/t5/Device-Management/change-Time-Zone-with-xml/m-p/17007/highlight/true#M1023
============================================================
You can not set the name of a TimeZone using the registry!
You only can set the Offset and DST values. The clock panel then uses a matching entry.
In the registry, the values for "GMT-7 (Mountain US)" and "GMT-7 (Arizona)" are nearly the same
[HKEY_LOCAL_MACHINE\Software\Microsoft\Clock]
"AppInfo"=hex(3):01,00,00,00,80,01,00,00,0f,00,00,00,00,00,00,00,00,00,00,00,3a,01,00,00,69,00,00,00,00,00,00,00,01,00,00,00
"AppState"=hex(3):11
"AutoDST"=dword:00000000
"GMT_OFFSET"=dword:000001A4
"HomeDST"=dword:00000000
"NetworkTimeNotifyUser"=dword:00000001
"NetworkTimeSync"=dword:00000001
"TZIndex"=dword:00000004
(see also http://peterfoot.net/HomeAndVisitingClocksInProfessionalEdition.aspx)
and
[HKEY_LOCAL_MACHINE\Software\Microsoft\Clock]
"AppInfo"=hex(3):01,00,00,00,80,01,00,00,0a,00,00,00,00,00,00,00,01,00,00,00,3a,01,00,00,69,00,00,00,00,00,00,00,01,00,00,00
"AppState"=hex(3):11
"AutoDST"=dword:00000000
"GMT_OFFSET"=dword:000001A4
"HomeDST"=dword:00000001
"NetworkTimeNotifyUser"=dword:00000001
"NetworkTimeSync"=dword:00000001
"TZIndex"=dword:00000004
But, as you can see, there is no Name String of the time zone.
[HKEY_LOCAL_MACHINE\Time]
"TimeZoneInformation"=hex(3):a4,01,00,00,55,00,53,00,20,00,4d,00,6f,00,75,00,6e,00,74,00,61,00,69,00,6e,00,20,00,53,00,74,00,61,00,6e,00,64,00,61,00,72,00,64,00,20,00,54,00,69,00,6d,00,65,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,55,00,53,00,20,00,4d,00,6f,00,75,00,6e,00,74,00,61,00,69,00,6e,00,20,00,44,00,61,00,79,00,6c,00,69,00,67,00,68,00,74,00,20,00,54,00,69,00,6d,00,65,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,c4,ff,ff,ff
and
[HKEY_LOCAL_MACHINE\Time]
"TimeZoneInformation"=hex(3):a4,01,00,00,4d,00,6f,00,75,00,6e,00,74,00,61,00,69,00,6e,00,20,00,53,00,74,00,61,00,6e,00,64,00,61,00,72,00,64,00,20,00,54,00,69,00,6d,00,65,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,0b,00,00,00,01,00,02,00,00,00,00,00,00,00,00,00,00,00,4d,00,6f,00,75,00,6e,00,74,00,61,00,69,00,6e,00,20,00,44,00,61,00,79,00,6c,00,69,00,67,00,68,00,74,00,20,00,54,00,69,00,6d,00,65,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,02,00,02,00,00,00,00,00,00,00,c4,ff,ff,ff
These are the TimeZoneInformations (the TIME_ZONE_INFORMATION structure).
Clipboard02.gif
You may query the timezone city db as done in the attached file (TZ-cities.txt).
The attached tool (timezoneset.exe) can be used to change the offset of the current active timezone.
The time zone informations for Prague and Berlin are the same:
index: 95
short name: GMT+1 Prague,Budapest
name: Central Europe Standard Time
GMT offset: -60
dst name: Central Europe Daylight Time
DST offset: 0
...
index: 110
short name: GMT+1 Berlin,Rome
name: W. Europe Standard Time
GMT offset: -60
dst name: W. Europe Daylight Time
DST offset: 0
except for the dst name.
It is no good idea to set timezone informations using the registry.

SignatureDoesNotMatch error while connecting to Amazon S3 through JAVA

I am getting the error as "SignatureDoesnotMatch" since last 4 hours.Please check and let me know what is missing in my code:
AmazonS3 s3Client = new AmazonS3Client(new ProfileCredentialsProvider());
s3Client.setEndpoint("***my-service-end-point");
s3Client.setRegion("my-region");
java.util.Date expiration = new java.util.Date();
long milliSeconds = expiration.getTime();
milliSeconds += 1000 * 60 * 60;
expiration.setTime(milliSeconds);
GeneratePresignedUrlRequest generatePresignedUrlRequest =
new GeneratePresignedUrlRequest(existingBucketName, keyName);
generatePresignedUrlRequest.setMethod(HttpMethod.GET);
generatePresignedUrlRequest.setExpiration(expiration);
URL url = s3Client.generatePresignedUrl(generatePresignedUrlRequest);
System.out.println("s3Client :" + s3Client.getBucketLocation(existingBucketName))
First try to integrate latest aws sdk in your code and if still doesn't work then I think you are facing this issue with signature version 4 authentication mechanism. Amazon documentation states that
**
In the Asia Pacific (Mumbai), Asia Pacific (Seoul), EU (Frankfurt) and
China (Beijing) regions, Amazon S3 supports only Signature Version 4.
In all other regions, Amazon S3 supports both Signature Version 4 and
Signature Version 2.
**
Please look into these links:
http://doatt.com/2015/01/19/aws-s3-and-the-signaturedoesnotmatch-error/
http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html
http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html
http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html
I hope this will give you enough idea to solve this problem.

how to set the time zone of INDIA in rails 3

I am fresher in rails,
how to set the time zone of INDIA in rails 3 ?
where to specify this?
Please help.
In your config/application.rb, add this
config.time_zone = 'Kolkata'
That should work.
Later you can confirm this by running the following in rails console
>> Time.zone
#output
(GMT+05:30) Kolkata
You may just run 'rake time:zones:all' in your shell, you will find all the Timezones displayed for using in Rails development. From the above you can easily find INDIAN timezone as shown below.
* UTC +05:30 *
Chennai
Kolkata
Mumbai
New Delhi
Put any of the above names in your config/application.rb as follows:
config.time_zone = 'Chennai'
Just restart the server and you will find the timezone updated.
Thank you.