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

error in line 1458 of JSON file dashboards/clientdash.json #42

Open
tiiilerteee opened this issue Feb 20, 2024 · 1 comment
Open

error in line 1458 of JSON file dashboards/clientdash.json #42

tiiilerteee opened this issue Feb 20, 2024 · 1 comment

Comments

@tiiilerteee
Copy link
Contributor

Thank you for these great dashboards for TRMM!

Just FYI: there is an error in line 1458 of JSON file dashboards/clientdash.json

There are special characters that are not properly escaped and need double backslashes

suggested to replace line 1458:

"rawSql": "SELECT \n count() as "count",\n (CASE \n WHEN wmi_detail->'cpu' IS NOT NULL\n THEN SUBSTRING(agents_agent.wmi_detail->'cpu'->0->0->>'Name','(?:AMD|\d\dth Gen Intel(R)||Intel(R)|Intel)(.)(?:@|Processor||with)')\n ELSE SUBSTRING(agents_agent.wmi_detail->'cpus'->>0,'(?:AMD|\d\dth Gen Intel(R)||Intel(R)|Intel)(.*)(?:@|Processor||with)')\n END) as "CPU Name"\nFROM agents_agent\n INNER JOIN clients_site ON agents_agent.site_id = clients_site.id\n INNER JOIN clients_client ON clients_site.client_id = clients_client.id\nWHERE\n clients_client.name IN ($Client)\n AND clients_site.name IN ($Sites)\nGroup by "CPU Name"\nOrder by "count" desc",

with:

"rawSql": "SELECT \n count() as "count",\n (CASE \n WHEN wmi_detail->'cpu' IS NOT NULL\n THEN SUBSTRING(agents_agent.wmi_detail->'cpu'->0->0->>'Name','(?:AMD|\d\dth Gen Intel\(R\)||Intel\(R\)|Intel)(.)(?:@|Processor||with)')\n ELSE SUBSTRING(agents_agent.wmi_detail->'cpus'->>0,'(?:AMD|\d\dth Gen Intel\(R\)||Intel\(R\)|Intel)(.*)(?:@|Processor||with)')\n END) as "CPU Name"\nFROM agents_agent\n INNER JOIN clients_site ON agents_agent.site_id = clients_site.id\n INNER JOIN clients_client ON clients_site.client_id = clients_client.id\nWHERE\n clients_client.name IN ($Client)\n AND clients_site.name IN ($Sites)\nGroup by "CPU Name"\nOrder by "count" desc",

@dinger1986
Copy link
Owner

Please PR and I will accept it

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

No branches or pull requests

2 participants