Commit graph

21 commits

Author SHA1 Message Date
raviks789
605834e7c4 trait cannot be a type for property
Replace the type of properties with type Icinga\Module\Icingadb\Common\Database with type ipl\Sql\Connection.
2022-02-18 10:06:59 +01:00
raviks789
6552ae2004 Use trait Icinga\Module\Icingadb\Common\Database as icingadb backend object 2022-02-18 10:06:59 +01:00
raviks789
df3f363f1b Add static fetchDb() method to library/Businessprocess/IcingaDbObject.php
Use this static method to get backend in IcingaDbState.
2022-02-18 10:06:02 +01:00
raviks789
685f44d118 Change class name IcingaDbBackend to IcingaDbObject 2022-02-03 16:55:02 +01:00
raviks789
9b0c4cca34 Remove IcingadbBackend class extension from IcingaDbState and clean IcingaDbState class.
Do not assemble the query as there is no need to do that. Also, no need to have associative arrays for host and service state columns.
2022-02-03 16:55:02 +01:00
raviks789
df72ff65be Move enumHostListByFilter and enumServiceListByFilter to EnumList trait.
Move enumHostListByFilter and enumServiceListByFilter to EnumList trait from AddNodeForm and change fetchServices and fetchHosts
method to work with filters in IcingaDbBackEnd class.
Also, applyMonitoringRestriction is changed to applyIcingaDbRestrictions in IcingaDbBackend.
2022-02-03 16:55:02 +01:00
Ravi Kumar Kempapura Srinivasa
f9be5f81d6 Change state calculation in IcingaDbState
Since we are fetching the values directly using assembleSelect instead of using ORM, 'last_state_change', 'in_downtime' and 'ack' have different values compared to monitored nodes other than IcingaDb MySQL backend. This is addresses in this commit.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
d1526a36cb Address the comments on IcingaDbState and the Controllers
Address the comments from Eric in the pull request on IcingaDbState, Web/Controller, HostController and ServiceController.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
ce3bbde289 Apply public static getRestriction and applyMonitoringRestriction changes
Apply the public static getRestriction and applyMonitoringRestriction changes in the places were the corresponding methods are used.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
d494cf3cee Each PHP statement must be on a line by itself
Previously there was an error during php codesniffer test at line 53 of IcingaDbState. Changes are made to correct this error.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
c0f422d750 Resolve PHP CodeSniffer issue
Remove the extra semi-colon in line 53 in IcingaDbState
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
843a556f6e Remove the unwanted comments in IcingaDbState
Clean IcingaDbState class by removing the unwanted comments.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
efcea15ab6 Clean the scripts and resolve the comments
Clean the scripts to pass the phpcodesniffer tests and resolve the comments provided by Eric.
2022-02-03 16:54:01 +01:00
Ravi Kumar Kempapura Srinivasa
1a0ddfb08b Add IcingaDB MySQL backend in businessprocess
IcingaDB MySQL backend is added to the businessprocess module to obtain information regarding monitored nodes.

ref #276
2022-02-03 16:54:01 +01:00
Eric Lippmann
a2854e8cf4 Use display_name as alias for host and service nodes 2020-02-05 15:01:22 +01:00
Johannes Meyer
6f3ffe48e2 BpConfig: Only list each involved configuration once 2019-02-25 08:19:39 +01:00
Johannes Meyer
a681d7e393 Fix that imported nodes have no state, once and for all 2019-02-22 12:26:24 +01:00
Thomas Gelf
079352d3b8 MonitoringState: filter host_name, not name
fixes #189
2018-12-12 15:40:14 +01:00
Markus Frosch
bf52fd0dd6 MonitoringState: Improve host and service filter
`host IN ...` is a lot faster than `host = 'xx' OR host = 'yy'` in
larger processes.

And document performance of querying for specific services.
2017-06-01 15:40:09 +02:00
Thomas Gelf
22583aa083 BpConfig: renamed from BusinessProcess 2017-01-11 14:09:30 +01:00
Thomas Gelf
8f1ce049de MonitoringState: introduce new helper class
Removes logic from BusinessProcess class
2017-01-11 09:51:39 +01:00