I need to create a report. Table: cmdb_ci_server

Prince Sai
Giga Expert

Hi Everyone,

I need to create a report. Table is cmdb_ci_server. The condition is I need to show particular records when the their "status" field is changed.

Ex: I need to show servers which status are changed in this current month.

Thanks in advance.

Prince

 

1 ACCEPTED SOLUTION

Hi @Prince Sai 

Got it. Couple of things you need to implement before configuring the Report to achieve what you are looking for:

1) Metrics works only for Task table and for tables which are coming from Task Table. So by default it will not work for Server9cmdb_ci_server) table.

2) In order to make this work then Navigate to the Business Rule named as "metrics events" as shown below:

find_real_file.png

3) Open this Record and Select Table as "cmdb_ci_server" and Right click on the header  and do Insert and Stay as shown below:

find_real_file.png

4) Now when you change the status Metric will auto calculate it as you want.

5) Now Next part is you want to show columns of Server table in the report so you need to create a Database view here which will join Metric Instance table and Server table and then you can report on the database view and that should be it as explained below:

Navigate to the module Database View as shown below:

find_real_file.png

Click on new and create a Database View by naming it as "server_status" as shown below:

find_real_file.png

 Now scroll down and click on Related list named as View Tables and create entry exactly similar to as shown below:

find_real_file.png

Now you can report on this Database View and will allow you to select both fields from Server table and also on Metric instance which will give you what has changed as shown below:

Change your table in Report to the database view which you have created as shown below:

find_real_file.png

Select your Report as List only and now go to 3rd tab and select Columns from Server table as you want as shown below:

find_real_file.png

Result:

find_real_file.png

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

9 REPLIES 9

Saurav11
Kilo Patron
Kilo Patron

Hello,

For this you have to create definition on metric_instance and then report on the metric_instance table.

You can refer the OOB assignment grp definition created for Incident table and the create a same for status on cmdb_ci_server table.

Please mark answer correct/helpful based on Impact

Hello,

If my answer helped you can you also mark it as correct.

Thanks.

shloke04
Kilo Patron

Hi @Prince Sai 

Please follow the steps below to achieve your requirement:

1) Navigate to the module "Definition" under Metric as shown below:

find_real_file.png

2) Now click on New and configure a New metric against your Server Table as shown below:

find_real_file.png

Now what this will do is when ever the status of a Server record changes it will keep a track of it and you can report on this data as well:

1) Navigate to Create New module under Report as shown below:

find_real_file.png

2) Now select the Table as "metric_instance" and configure your report as shown in screenshots below:

find_real_file.png

 

Select type of Report as "List:

find_real_file.png

Now put a filter condition to show your Metric only for Server table as shown below and then click on Save and Run the report:

find_real_file.png

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

shloke04
Kilo Patron

Hi @Prince Sai 

If my answer has helped you then please mark it as correct and close this thread for others.

If you have a follow up query then let me know.

Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke