Wiki source code of JIRA as CMDB

Version 15.1 by Normann P. Nielsen on 2026/11/15 15:44

Show last authors
1 {{success}}**This is a POC for using JIRA as a CMDB**
2
3
4
5 An Issue is a "Configuration" item like a server, laptop, MySQL Database etc.{{/success}}
6
7 {{info}}**Why?**
8
9
10
11 Well, most of the (seen from a ITIL Service Operation view) data is actually in JIRA, this is Incidents, Changes and Service Requests...
12
13 Secondly, JIRA can be seen as a mere Form/workflow control system{{/info}}
14
15
16
17 Ive actually been running this for +7 year at my workplace with a great success (slightly smiling face)
18
19
20
21 {{toc/}}
22
23 = Architechture =
24
25 {{diagram reference="Main.atlassian.atlassian-jira.jira-as-cmdb.architecture-drawio.WebHome" /}}
26
27
28
29
30
31 = Data validity, quality and maintenance =
32
33 JIRA has strict fields
34
35 JIRA has versioning on all field changes (history)
36
37 JIRA field can by updated by GUI and programmatically (CLI, RCP, SOAP)
38
39 Tabbed input:
40
41 [[image:Screen Shot 2012-11-01 at 10.59.10.jpg||width="800"||alt="Screen Shot 2012-11-01 at 10.59.10.jpg"]]
42
43 Fields / Links to Configuration Items from/to other JIRA Issues - Hostname lookup on the Summary field works
44
45 [[image:Screen Shot 2012-11-01 at 09.32.54.jpg||width="800"||alt="Screen Shot 2012-11-01 at 09.32.54.jpg"]]
46
47 an alternative to linking could be a (multi)select field on issues in JIRA - like Kepler DB Lookup - [[https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.databasecf]]
48
49 Or: [[https://marketplace.atlassian.com/plugins/com.consultingtoolsmiths.jira.plugins.createandlink]]
50
51 = Data out =
52
53 Data can be extracted/fed out via:
54
55
56
57 JIRA XML/RSS Feeds
58
59 Atlassian CLI
60
61 SQL Quiries
62
63 = Simplifying data from scripts =
64
65 Field-values updated via CLI:
66
67
68 {{code}}
69 jira.sh --action setFieldValue --issue "CMDB-4" --field "Memory" --values "1024 MB"jira.sh --action setFieldValue --issue "CMDB-4" --field "VM Version" --values "9"
70 {{/code}}
71
72 {{error}}The CLI only supports updating 2 fields in one call, hence 4 field will required 2 calls - and (possible) 2 notifications fired{{/error}}
73
74
75
76 = Sanity Checks =
77
78 We want to make a reverse check to make sure data is sane:
79
80 * Is Virtual Center attributes aligned with JIRA State ?
81 * Er der NetVault eller rsync data - i forhold til objektets servicemål/state
82 * Is Monitoring data correct with Virtual Center Tags
83 * Is the server in the Financial systems (for invoicing)
84 * Is monitoring data coffect with monitoring system
85 = Rapporting =
86
87 Watchers on the Configuration Item (Issue)
88
89 Daily summary: [[https://confluence.atlassian.com/display/JIRA/Receiving+a+Daily+Summary+of+Updated+Issues]]
90
91 = Screenshots =
92
93 === Dashboard ===
94 === [[image:Screen Shot 2012-11-01 at 10.57.31.jpg||width="800"||alt="Screen Shot 2012-11-01 at 10.57.31.jpg"]] ===
95 === Configuration Item (sample for a server) ===
96 **Links to events / tasks / incidents:**
97
98 **[[image:Dash3.jpg||width="500"||alt="Dash3.jpg"]]**
99
100 **Virtual Center Data:**
101
102 **[[image:Dash2.jpg||width="500"||alt="Dash2.jpg"]]**
103
104 **Service / Support data:**
105
106 [[image:Dash3.jpg||width="500"||alt="Dash3.jpg"]]
107
108 **Monitoreringdata:**
109
110 **[[image:Dash4.jpg||width="500"||alt="Dash4.jpg"]]**
111
112 = Workflow/Lifecycle =
113
114 A server (or other Configuration Item) can have a controlled lifecycle (implemented as a workflow):
115
116 {{diagram reference="Main.atlassian.atlassian-jira.jira-as-cmdb.lifecycle-drawio.WebHome" /}}
117
118
119
120
121
122 = Challenges =
123
124 Issues kan have server/object-name as Ident
125
126 Summary can be non-unique (e.g. 2 Configuration Items with same name can be created)
127
128 Does not work: issuetype=server and (Memory changed after startOfWeek("-1") before startOfWeek())"
129
130 = Screenshots =
131
132 = [[image:Screen Shot 2012-11-01 at 09.08.00.jpg||width="800"||alt="Screen Shot 2012-11-01 at 09.08.00.jpg"]] =
133
134 = Tests =
135
136 Updating field(s) with no changes:
137
138
139 {{code}}
140 spiderman:atlassian-cli npn$ ./change-serverfields.sh There are no field values changed by the parameters specified. Issue CMDB-4 not changed.spiderman:atlassian-cli npn$
141 {{/code}}
142
143 Hence, the CLI/JIRA takes care of changes and ignores no changes.
144
145
146
147 Updating field(s) with changes;
148
149
150 {{code}}
151 spiderman:atlassian-cli npn$ ./change-serverfields.sh Issue CMDB-4 updated.spiderman:atlassian-cli npn$
152 {{/code}}
153
154 Hence, the issue is updated.
155
156 = Ideas =
157
158 === Metadaa ===
159 * Scan servers for all *.sh and *.log files and save in JIRA field - for reference/documentation/searchability
160 * Save crontab for all servers in JIRA field - for reference/documentation/searchability
161 = Script information =
162
163 Its an option to put more control into the update-scripts:
164
165 {{error}}This introduces added complexibility and logic outside JIRA.{{/error}}
166
167
168
169 Flow for updating every value:
170
171 {{diagram reference="Main.atlassian.atlassian-jira.jira-as-cmdb.flow-drawio.WebHome" /}}