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

Question: creating time-objects with fileshipper #25

Open
Charlinya opened this issue Dec 21, 2018 · 0 comments
Open

Question: creating time-objects with fileshipper #25

Charlinya opened this issue Dec 21, 2018 · 0 comments

Comments

@Charlinya
Copy link

In our environment we have DB's with different Backup-times. I wanted to create time objects for them via fileshipper, to apply them later with a sync rule. In the sync rules I’m able to connect the imported data with the field time-ranges. So I tried different notations in my csv-sheet because I always thought that the timeranges in icinga2 are some kind of array.

Problem

So instead of getting a timerange that looked like this:

object TimePeriod "TP_5x9" {
    import "legacy-timeperiod"
    display_name = "TP_5x9"
    ranges = {
        "friday"	= "08:00-17:00"
        "monday"	= "08:00-17:00"
        "thursday"	= "08:00-17:00"
        "tuesday"	= "08:00-17:00"
        "wednesday"	= "08:00-17:00"
    }
}

I got something like this:

object TimePeriod "tosnowaok" { 
   import "legacy-timeperiod"
   display_name = "testdb1" 

    ranges = {
               "0"   = "\"00:00-06:10;08:20-24: 00\""
     }
}

Here is an example what my test-csv looked like:

db-instanz;timeperiod
!testdb1!;!"00:00-06:10;08:20-24:00"!
!testdb2!;!"friday" = "00:00-06:10,08:20-24:00";"monday" = "00:00-06:10,08:20-24:00"!
!testdb3!;!"[ "friday" = "00:00-06:10,08:20-24:00", "monday" = "00:00-06:10,08:20-24:00" ]"!

I tried a few things to cover different cases how the fileshipper sets the time ranges and if there is any way to link the days to the times.

Can someone tell me how to do this?

I didn’t find any documentation about this special topic…

Your Environment

  • Module version (fileshipper ): 1.1.0
  • Icinga Web 2 version and modules (System - About): 2.6.1 (director 1.5.2)
  • Icinga 2 version : 2.10.1-1
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

1 participant