Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Gelöst: Gesundheitszustand des Systemes

    NEWS

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    • Wir empfehlen: Node.js 22.x

    Gelöst: Gesundheitszustand des Systemes

    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      michihorn last edited by michihorn

      Hallo Zusammen
      gibt es bereits ein Script mit dem man den Gesundheitszustand des Systemes versenden kann, ich denke da an die Host-Daten CPU, RAM, Betriebszeit.

      Gruß
      Michael

      Homoran 1 Reply Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @michihorn last edited by Homoran

        @michihorn sagte in Gesundheitszustand des Systemes:

        Hallo Zusammen
        gibt es bereits ein Script mit dem man den Gesundheitszustand des Systemes versenden kann, ich denke da an die Host-Daten CPU, RAM, Betriebszeit.

        Gruß
        Michael

        stehen in den Objekten

        Screenshot_20231004-131028_Firefox.jpg

        M 1 Reply Last reply Reply Quote 1
        • M
          michihorn @Homoran last edited by michihorn

          @homoran Habe das jetzt mal wie folgt gelöst:

          /*****System Health Daten Master/Slave ***********************************
          **    OKT 2023
          **    WhatsApp-Bot, Java
          **    Script sendet tägl. um 8:15 Uhr System Health Daten per Whatsapp
          **    erstellt: 05.10.23
          **    geändert: 
          *************************************************************************/
          
          var logging = true
          var textm, texts, text, textD
          const idmaster = "system.host.master.alive"
          const idmastercpu = "system.host.master.cpu"
          const idmastermem = "system.host.master.mem"
          const idmastercputime = "system.host.master.uptime"
          const idslave = "system.host.slave.alive"
          const idslavecpu = "system.host.slave.cpu"
          const idslavecputime = "system.host.slave.uptime"
          const idslavemem = "system.host.slave.mem"
          
          
          schedule({hour: 8, minute: 15}, function(){
          
              var timem = (getState(idmastercputime).val); // Zeit in Sekunden
              var timemaster = Math.floor(timem / 60 / 60 / 24) + ' Tag(e), ' + Math.floor(timem / 60 / 60 % 24) + ' Std, ' + Math.floor((timem / 60) % 60) + ' Min';
          
              var times = (getState(idslavecputime).val); // Zeit in Sekunden
              var timeslave = Math.floor(times / 60 / 60 / 24) + ' Tag(e), ' + Math.floor(times / 60 / 60 % 24) + ' Std, ' + Math.floor((times / 60) % 60) + ' Min';
          
              log("Master " + timemaster);
              log("Slave " + timeslave);
          
              textm = '⌚ *Online Zeit Master*\n ' + timemaster + '\n CPU Last  ' + (getState(idmastercpu).val) + '%' + '\n freier RAM  ' + (getState(idmastermem).val) + '%'
              textD = '\n '
              texts = '  *Online Zeit Slave*\n ' + timeslave + '\n CPU Last  ' + (getState(idslavecpu).val) + '%' + '\n freier RAM  ' + (getState(idslavemem).val) + '%'
              text = textm + textD + texts
              if (logging) sendTo('whatsapp-cmb.0', 'send', { text: text, phone: '+49152xx938xxx' });
          
          });
          

          Auf dem Handy sieht das so aus:
          Screenshot 2023-10-05 081538.png

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Support us

          ioBroker
          Community Adapters
          Donate
          FAQ Cloud / IOT
          HowTo: Node.js-Update
          HowTo: Backup/Restore
          Downloads
          BLOG

          864
          Online

          32.0k
          Users

          80.6k
          Topics

          1.3m
          Posts

          scripte
          2
          3
          148
          Loading More Posts
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes
          Reply
          • Reply as topic
          Log in to reply
          Community
          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
          The ioBroker Community 2014-2023
          logo