IT Service Health Monitoring by means of R. A different angle

It would seem that the topic has long been trodden, the peak of innovation of OSS systems is long over. However, sometimes there are local hot outbursts and violent disputes on this topic. You can walk along the vendor road, or you can try to gnaw this problem from a different angle.







Keywords: cmdb, multi-agent sumulation, monte-carlo, ml.







It is a continuation of a series of previous publications .







Formulation of the problem



We will not describe the production in detail, on the Internet you can find it for every taste and wallet. The abstract looks like this (originally invented by ITSM consultants):







  • there is a CMDB (configuration base of IT elements). It contains a description of elements and connections between them (graph);
  • there is a monitoring system that somehow takes readings of the physical incarnations of CI elements;
  • there is some kind of business service that is based on infrastructure elements (servers, applications, API, tests, ...);
  • the relationship between a service and elements is usually described by a tree and is called a resource-service model (PCM);
  • Infrastructure elements have their own parameters (KPI) according to which, taking into account topological connectivity, it is necessary to calculate the health of the business service (health / KQI).


Let's take a typical picture of PCM from the documentation of one of the apologists of this topic (HP).







RSM.  The source was here: https: //docs.microfocus.com/OMi/10.62/Content/OMi/images/ServiceHealth.png







How is it usually done



:







  • ;
  • ;
  • ;
  • .


. — () . .







:











2021 . . — .













  • «multi-agent sumulation»: , ( ) ( );
  • «itsm»: ( );
  • «monte-carlo»: MAS ;
  • «ml»: data.frame



    (rule fit, Modern Rule-Based Models by Max Kuhn), «» ;
  • «prod»: ml «» event propagation «».


R?



, . . , R . … Shiny. , Shiny, … Shiny.







multi-agent simulation . Shiny, . , . Reactive programming in R by Joe Cheng, DSC 2014







, - nodeA



-> nodeB



-> nodeC



.







MAS «»
library(tidyverse)
library(magrittr)
library(shiny)
library(foreach)
library(iterators)
options(shiny.suppressMissingContextError=TRUE)

makeReactiveBinding("nodeA")
nodeA$in_1 <- NULL
nodeA$in_2 <- NULL
nodeA$out <- reactive(nodeA %$% (in_1 + in_2))

makeReactiveBinding("nodeB")
nodeB$in_1 <- reactive(nodeA$out())
nodeB$in_2 <- NULL
nodeB$out <- reactive(nodeB %$% (in_1() + in_2))

makeReactiveBinding("nodeC")
nodeC$in_1 <- reactive(nodeB$out())
nodeC$in_2 <- NULL
nodeC$out <- reactive(nodeC %$% (in_1() * in_2))

df <- tidyr::expand_grid(val1 = 0:5, val2 = 0:5, val3 = 0:5, val4 = 0:5) %>%
  #     -
  mutate(direct_res = (val1 + val2 + val3) * val4)

res <- foreach(it = iter(df, by = "row"), .combine = "c") %do%
  {
    nodeA$in_1 <- it$val1
    nodeA$in_2 <- it$val2
    nodeB$in_2 <- it$val3
    nodeC$in_2 <- it$val4
    shiny:::flushReact()
    nodeC$out()
  }
df$mas_res <- res
      
      





Then pull on an data.frame



ensemble of trees (or gbm or something else ...) and make a forecast in two lines. In this case, the response formula for each agent can be written by any available means. Due to the fact that the states of agents in this task are limited, instead of formulas, you can create a configuration excel (example below), which is understandable to any manager and does not require any disputes. Do you think line # 7 should output 'bad'? We write and don't even argue. "My service is my rules!"







Agent configuration for managers







Actually everything, the problem is solved, the movie is over.







Previous post - "A Little About Parallel Computing in R" .








All Articles