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

Problem with collector configuration #104

Open
Fran765 opened this issue Nov 21, 2023 · 9 comments
Open

Problem with collector configuration #104

Fran765 opened this issue Nov 21, 2023 · 9 comments
Labels
question Further information is requested

Comments

@Fran765
Copy link

Fran765 commented Nov 21, 2023

Hi!
I have a structure with a CS(ip: 10.114.80.16), SS Management(ip: 10.114.10.17), SS1(ip: 10.114.10.18), SS2(ip: 10.114.10.19) and a server for Metrics(ip: 10.114.80.20 ) in which the different modules (collector, corrector, reports) and mongodb are installed.
I have the 'setting.yaml' of the collector configured like this:
image

Where should I download the "tls-client-certificate" and "tls-client-key"? and then put 'true' in the "tls-server-certificate"
I also have the following error, when using the collector and executing "xroad-metrics-collector update" it returns the following error:

File "/usr/lib/python3/dist-packages/pymongo/topology.py", line 208, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: SSL handshake failed: 127.0.0.1:27017: EOF occurred in violation of protocol (_ssl.c:1131)

But when I run "xroad-metrics-collector list" it works correctly.
image

This is how I currently have the mongo configuration:
image

@raits raits added the question Further information is requested label Nov 22, 2023
@raits
Copy link
Contributor

raits commented Nov 22, 2023

Hello @Fran765,

The error you are receiving looks to be because you have configured MongoDB to use TLS authentication, but the provided certificate does not appear to work. Have you also configured MongoDB to accept TLS authentications? The default installation only sets up the password based authentication.

As for configuring mTLS with the Security Server, more information on how to do that is available in the X-Road documentation: https://docs.x-road.global/Manuals/ug-ss_x-road_6_security_server_user_guide.html#9-communication-with-information-systems

@Fran765
Copy link
Author

Fran765 commented Nov 30, 2023

Hi @raits,

Solved the previous problem by leaving password-based authentication.

I have the following error when I run the command "xroad-metrics-collector collect":
image

What is the problem due to?

@raits
Copy link
Contributor

raits commented Nov 30, 2023

Hey,

It looks like the Security Server does not have the operational monitoring addon installed. You should be able to resolve it by simply installing the xroad-addon-opmonitoring package with your package manager on the specific Security Server.

@Fran765
Copy link
Author

Fran765 commented Nov 30, 2023

I installed monitoring on my three security servers, it works on two but on the other I get the following error:
image

On the server that is not working I made a status and it returned the following
image

I already tried reinstalling it again

@raits
Copy link
Contributor

raits commented Dec 1, 2023

Did you receive any errors during the installation process? Could you also try restarting all of the X-Road services and check the logs for any errors that might be occurring?

@Fran765
Copy link
Author

Fran765 commented Dec 12, 2023

Hi @raits, you can solve the problem by removing the service and reinstalling it.
Currently it works correctly, except that when I generate the reports it takes me the period from 11-01-2023 to 11-30-2023, is there no possibility of changing this period to generate the PDFs weekly?

@raits
Copy link
Contributor

raits commented Dec 28, 2023

Hey @Fran765,

It's possible, but by default, the report generation is meant to be run once a month. The way that the default installation sets it up is with this cron job:

# m h dom mon dow user command
1 03 10 * * xroad-metrics xroad-metrics-reports report

It just passes in the report command, which defaults the start date to the beginning of the previous month and the end date to the end of the previous month. This behaviour can be modified by passing in the --start-date and --end-date arguments for the report command:

parser.add_argument(
'--start-date',
dest='start_date',
metavar="DATE",
help='Report start date in format "YYYY-MM-DD". Default is the first day of the previous month',
default=start_date_default
)
parser.add_argument(
'--end-date',
metavar="DATE",
dest='end_date',
help='Report end date in format "YYYY-MM-DD". Default is the last day of the previous month',
default=end_date_default
)

It means that you would need to set up a cron job or some other scheduled task that also calculates the correct start and end dates for arguments based on your custom schedule.

@SowAbdoul
Copy link

SowAbdoul commented Oct 9, 2024

Greetings, @Fran765
I hope you're doing well.

I'd like to implement this architecture like you, could you provide me with the manuals that follow.

CS(ip : x.x.x.x), SS Management(ip : x.x.x.x), SS1(ip : x.x.x.x), SS2(ip : x.x.x.x) and a server for Metrics(ip : x.x.x.x) containing the various modules (collector, corrector, reports) and mongodb.

I already know the ansible project for CS and SS. I'm having a bit of trouble with SS Management and X-Road Metrics

@Fran765
Copy link
Author

Fran765 commented Oct 15, 2024

Hi @SowAbdoul
The same to you.

I'm sorry I can't help you. The previous project was not continued, so I don't have any documentation available.
During the project, we solved many problems and questions via the "nordic-institute" forums.

Greetings and success.

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